aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/state.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-10 21:05:06 +0800
committerobscuren <geffobscura@gmail.com>2014-07-10 21:05:06 +0800
commite504088b79f55dd08749f08f434cb85a0033898f (patch)
tree16a7d815f796c89f186c9fbfab7a40e3ff4e7500 /ethchain/state.go
parentd52e5f7130b58ec9ead7bb20478919f06b0b1a01 (diff)
downloadgo-tangerine-e504088b79f55dd08749f08f434cb85a0033898f.tar.gz
go-tangerine-e504088b79f55dd08749f08f434cb85a0033898f.tar.zst
go-tangerine-e504088b79f55dd08749f08f434cb85a0033898f.zip
Consensus and bug fixes
* Ensure that each state object has an address that is 20 bytes * Byte logging for vm * changed diff output
Diffstat (limited to 'ethchain/state.go')
-rw-r--r--ethchain/state.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/ethchain/state.go b/ethchain/state.go
index f5c038226..155366376 100644
--- a/ethchain/state.go
+++ b/ethchain/state.go
@@ -1,6 +1,7 @@
package ethchain
import (
+ "fmt"
"github.com/ethereum/eth-go/ethcrypto"
"github.com/ethereum/eth-go/ethtrie"
"github.com/ethereum/eth-go/ethutil"
@@ -36,7 +37,8 @@ func (s *State) Reset() {
continue
}
- stateObject.state.Reset()
+ //stateObject.state.Reset()
+ stateObject.Reset()
}
s.Empty()
@@ -69,6 +71,10 @@ func (self *State) Update() {
if stateObject.remove {
self.DeleteStateObject(stateObject)
} else {
+ stateObject.Sync()
+
+ fmt.Printf("%x %x\n", stateObject.Address(), stateObject.state.Root())
+
self.UpdateStateObject(stateObject)
}
}
@@ -78,7 +84,6 @@ func (self *State) Update() {
if !valid {
self.trie = t2
}
-
}
// Purges the current trie.