aboutsummaryrefslogtreecommitdiffstats
path: root/state/statedb.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-02-03 22:56:19 +0800
committerobscuren <geffobscura@gmail.com>2015-02-03 22:56:19 +0800
commit623469cb6c6cdb6ff84dc2cb7d4409e9d7cf3f65 (patch)
tree072752e2565b68b77e82e3ddebb72aa3b4a28b28 /state/statedb.go
parent663d725026b3d41d700c12d7b4ed06da5b3f7705 (diff)
downloaddexon-623469cb6c6cdb6ff84dc2cb7d4409e9d7cf3f65.tar
dexon-623469cb6c6cdb6ff84dc2cb7d4409e9d7cf3f65.tar.gz
dexon-623469cb6c6cdb6ff84dc2cb7d4409e9d7cf3f65.tar.bz2
dexon-623469cb6c6cdb6ff84dc2cb7d4409e9d7cf3f65.tar.lz
dexon-623469cb6c6cdb6ff84dc2cb7d4409e9d7cf3f65.tar.xz
dexon-623469cb6c6cdb6ff84dc2cb7d4409e9d7cf3f65.tar.zst
dexon-623469cb6c6cdb6ff84dc2cb7d4409e9d7cf3f65.zip
Added missing whisper timestamp. Closes #284
Diffstat (limited to 'state/statedb.go')
-rw-r--r--state/statedb.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/state/statedb.go b/state/statedb.go
index 1b6e274de..af054ff09 100644
--- a/state/statedb.go
+++ b/state/statedb.go
@@ -31,7 +31,7 @@ type StateDB struct {
// Create a new state from a given trie
func New(root []byte, db ethutil.Database) *StateDB {
- trie := trie.New(root, db)
+ trie := trie.New(ethutil.CopyBytes(root), db)
return &StateDB{db: db, trie: trie, stateObjects: make(map[string]*StateObject), manifest: NewManifest(), refund: make(map[string]*big.Int)}
}
@@ -234,12 +234,9 @@ func (self *StateDB) Copy() *StateDB {
}
func (self *StateDB) Set(state *StateDB) {
- if state == nil {
- panic("Tried setting 'state' to nil through 'Set'")
- }
-
self.trie = state.trie
self.stateObjects = state.stateObjects
+
self.refund = state.refund
self.logs = state.logs
}