mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-04 23:32:55 +00:00
Added generic add balance method
This commit is contained in:
parent
d586dd902d
commit
1d3f43f060
1 changed files with 7 additions and 0 deletions
|
|
@ -39,6 +39,13 @@ func (self *State) GetBalance(addr []byte) *big.Int {
|
||||||
return ethutil.Big0
|
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 {
|
func (self *State) GetNonce(addr []byte) uint64 {
|
||||||
stateObject := self.GetStateObject(addr)
|
stateObject := self.GetStateObject(addr)
|
||||||
if stateObject != nil {
|
if stateObject != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue