aboutsummaryrefslogtreecommitdiff
path: root/core/state
diff options
context:
space:
mode:
Diffstat (limited to 'core/state')
-rw-r--r--core/state/statedb.go3
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)