Renamed Address to Account

This commit is contained in:
obscuren
2014-03-03 11:05:12 +01:00
parent bfed1c7cac
commit 9d492b0509
4 changed files with 23 additions and 23 deletions

View File

@ -93,18 +93,18 @@ func Compile(code []string) (script []string) {
return
}
func (s *State) GetAccount(addr []byte) (account *Address) {
func (s *State) GetAccount(addr []byte) (account *Account) {
data := s.trie.Get(string(addr))
if data == "" {
account = NewAddress(big.NewInt(0))
account = NewAccount(big.NewInt(0))
} else {
account = NewAddressFromData([]byte(data))
account = NewAccountFromData([]byte(data))
}
return
}
func (s *State) UpdateAccount(addr []byte, account *Address) {
func (s *State) UpdateAccount(addr []byte, account *Account) {
s.trie.Update(string(addr), string(account.RlpEncode()))
}