diff options
author | Determinant <[email protected]> | 2020-06-30 20:56:12 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2020-06-30 20:56:12 -0400 |
commit | fbe0f2d6b14d7b6fc43068e224412d4e65176550 (patch) | |
tree | 5db367ee2d219386c2968f30e51c8c67c1ef8121 /core/state/statedb.go | |
parent | 7feec02902d52a3abf722613eb9e218e015b723c (diff) |
test multi-coin smart contracts
Diffstat (limited to 'core/state/statedb.go')
-rw-r--r-- | core/state/statedb.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/state/statedb.go b/core/state/statedb.go index 1d3207d..9c7535b 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -41,6 +41,7 @@ type revision struct { var ( // emptyRoot is the known root hash of an empty trie. emptyRoot = common.HexToHash("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421") + zeroRoot = common.HexToHash("0000000000000000000000000000000000000000000000000000000000000000") // emptyCode is the known hash of the empty EVM bytecode. emptyCode = crypto.Keccak256Hash(nil) @@ -239,7 +240,7 @@ func (self *StateDB) GetBalanceMultiCoin(addr common.Address, coinID common.Hash func (self *StateDB) EnableMultiCoin(addr common.Address) error { stateObject := self.GetOrNewStateObject(addr) - if stateObject.data.Root != emptyRoot { + if stateObject.data.Root != emptyRoot && stateObject.data.Root != zeroRoot { return errors.New("not a fresh account") } if !stateObject.EnableMultiCoin() { |