diff options
author | zelig <viktor.tron@gmail.com> | 2015-03-16 23:46:29 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2015-03-16 23:46:29 +0800 |
commit | 5e7702fd050ed5520a03cc2cfc8b1f45a70f35fb (patch) | |
tree | d5ba6197a8c0c8e36bb92ee9fc8aad717cb2d178 /state/dump.go | |
parent | 8393dab470c40678caf36ada82e312d29c4cf5c4 (diff) | |
parent | 22893b7ac925c49168c119f293ea8befc3aff5cc (diff) | |
download | dexon-5e7702fd050ed5520a03cc2cfc8b1f45a70f35fb.tar dexon-5e7702fd050ed5520a03cc2cfc8b1f45a70f35fb.tar.gz dexon-5e7702fd050ed5520a03cc2cfc8b1f45a70f35fb.tar.bz2 dexon-5e7702fd050ed5520a03cc2cfc8b1f45a70f35fb.tar.lz dexon-5e7702fd050ed5520a03cc2cfc8b1f45a70f35fb.tar.xz dexon-5e7702fd050ed5520a03cc2cfc8b1f45a70f35fb.tar.zst dexon-5e7702fd050ed5520a03cc2cfc8b1f45a70f35fb.zip |
Merge remote-tracking branch 'upstream/develop' into frontier/js
Conflicts:
cmd/ethereum/js.go
javascript/types.go
Diffstat (limited to 'state/dump.go')
-rw-r--r-- | state/dump.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/state/dump.go b/state/dump.go index 2c611d76b..c5f556e1a 100644 --- a/state/dump.go +++ b/state/dump.go @@ -4,7 +4,7 @@ import ( "encoding/json" "fmt" - "github.com/ethereum/go-ethereum/ethutil" + "github.com/ethereum/go-ethereum/common" ) type Account struct { @@ -22,7 +22,7 @@ type World struct { func (self *StateDB) RawDump() World { world := World{ - Root: ethutil.Bytes2Hex(self.trie.Root()), + Root: common.Bytes2Hex(self.trie.Root()), Accounts: make(map[string]Account), } @@ -30,14 +30,14 @@ func (self *StateDB) RawDump() World { for it.Next() { stateObject := NewStateObjectFromBytes(it.Key, it.Value, self.db) - account := Account{Balance: stateObject.balance.String(), Nonce: stateObject.nonce, Root: ethutil.Bytes2Hex(stateObject.Root()), CodeHash: ethutil.Bytes2Hex(stateObject.codeHash)} + account := Account{Balance: stateObject.balance.String(), Nonce: stateObject.nonce, Root: common.Bytes2Hex(stateObject.Root()), CodeHash: common.Bytes2Hex(stateObject.codeHash)} account.Storage = make(map[string]string) storageIt := stateObject.State.trie.Iterator() for storageIt.Next() { - account.Storage[ethutil.Bytes2Hex(storageIt.Key)] = ethutil.Bytes2Hex(storageIt.Value) + account.Storage[common.Bytes2Hex(storageIt.Key)] = common.Bytes2Hex(storageIt.Value) } - world.Accounts[ethutil.Bytes2Hex(it.Key)] = account + world.Accounts[common.Bytes2Hex(it.Key)] = account } return world } |