diff options
author | obscuren <geffobscura@gmail.com> | 2014-10-27 18:44:40 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-10-27 18:44:40 +0800 |
commit | 1d3f43f060e9ebb312fc3b17fc0fe43c8f95cd82 (patch) | |
tree | 5deb4a4de6d565eac8afa3ddc8cbf5b99bdd3223 | |
parent | d586dd902d1d850cb133583e8f6599e2a2973107 (diff) | |
download | go-tangerine-1d3f43f060e9ebb312fc3b17fc0fe43c8f95cd82.tar go-tangerine-1d3f43f060e9ebb312fc3b17fc0fe43c8f95cd82.tar.gz go-tangerine-1d3f43f060e9ebb312fc3b17fc0fe43c8f95cd82.tar.bz2 go-tangerine-1d3f43f060e9ebb312fc3b17fc0fe43c8f95cd82.tar.lz go-tangerine-1d3f43f060e9ebb312fc3b17fc0fe43c8f95cd82.tar.xz go-tangerine-1d3f43f060e9ebb312fc3b17fc0fe43c8f95cd82.tar.zst go-tangerine-1d3f43f060e9ebb312fc3b17fc0fe43c8f95cd82.zip |
Added generic add balance method
-rw-r--r-- | ethstate/state.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ethstate/state.go b/ethstate/state.go index fd6fa65a5..c23dab330 100644 --- a/ethstate/state.go +++ b/ethstate/state.go @@ -39,6 +39,13 @@ func (self *State) GetBalance(addr []byte) *big.Int { return ethutil.Big0 } +func (self *State) AddBalance(addr []byte, amount *big.Int) { + stateObject := self.GetStateObject(addr) + if stateObject != nil { + stateObject.AddBalance(amount) + } +} + func (self *State) GetNonce(addr []byte) uint64 { stateObject := self.GetStateObject(addr) if stateObject != nil { |