diff options
author | Determinant <[email protected]> | 2020-09-19 19:48:22 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2020-09-19 19:48:22 -0400 |
commit | ad82b990891525a754ebfe9155292b23408c9652 (patch) | |
tree | d086460a88df296ec866ab1b73627c50b8567b0a | |
parent | 80f76ae97372ea074ce660dbcaffd97c648ece22 (diff) |
auto-enable multicoin in AddBalanceMultiCoinv0.3.1-rc.2
-rw-r--r-- | core/state/statedb.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/state/statedb.go b/core/state/statedb.go index 81be542..dbf0870 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -425,6 +425,9 @@ func (s *StateDB) SetBalance(addr common.Address, amount *big.Int) { // AddBalance adds amount to the account associated with addr. func (s *StateDB) AddBalanceMultiCoin(addr common.Address, coinID common.Hash, amount *big.Int) { + if !s.IsMultiCoin(addr) { + s.EnableMultiCoin(addr) + } stateObject := s.GetOrNewStateObject(addr) if stateObject != nil { stateObject.AddBalanceMultiCoin(coinID, amount, s.db) |