diff options
author | Determinant <[email protected]> | 2020-09-20 00:51:32 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2020-09-20 00:51:32 -0400 |
commit | a3f584fc2bf41de7b9d6c03dfd79f921e2c8d4a6 (patch) | |
tree | c8c3fdf3c560ba1078114dad65b98f924c3dd275 /core/state | |
parent | 93a7f324c06321023e2702f7989fdfad32573793 (diff) |
get C-Chain internal asset transfer to workv0.3.2
Diffstat (limited to 'core/state')
-rw-r--r-- | core/state/state_object.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/state/state_object.go b/core/state/state_object.go index 9772859..bbfff1d 100644 --- a/core/state/state_object.go +++ b/core/state/state_object.go @@ -94,7 +94,7 @@ type stateObject struct { // empty returns whether the account is considered empty. func (s *stateObject) empty() bool { - return s.data.Nonce == 0 && s.data.Balance.Sign() == 0 && bytes.Equal(s.data.CodeHash, emptyCodeHash) + return s.data.Nonce == 0 && s.data.Balance.Sign() == 0 && bytes.Equal(s.data.CodeHash, emptyCodeHash) && !s.data.IsMultiCoin } // Account is the Ethereum consensus representation of accounts. @@ -430,6 +430,7 @@ func (s *stateObject) SubBalanceMultiCoin(coinID common.Hash, amount *big.Int, d } func (s *stateObject) SetBalanceMultiCoin(coinID common.Hash, amount *big.Int, db Database) { + s.data.IsMultiCoin = true NormalizeCoinID(&coinID) s.SetState(db, coinID, common.BigToHash(amount)) } @@ -566,9 +567,9 @@ func (s *stateObject) BalanceMultiCoin(coinID common.Hash, db Database) *big.Int // return true //} -func (s *stateObject) IsMultiCoin() bool { - return s.data.IsMultiCoin -} +//func (s *stateObject) IsMultiCoin() bool { +// return s.data.IsMultiCoin +//} func (s *stateObject) Nonce() uint64 { return s.data.Nonce |