diff options
Diffstat (limited to 'ethchain')
-rw-r--r-- | ethchain/state.go | 4 | ||||
-rw-r--r-- | ethchain/state_manager.go | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/ethchain/state.go b/ethchain/state.go index be25fe7b4..b9c2c576d 100644 --- a/ethchain/state.go +++ b/ethchain/state.go @@ -112,6 +112,10 @@ func (s *State) Cmp(other *State) bool { return s.trie.Cmp(other.trie) } +func (s *State) Copy() *State { + return NewState(s.trie.Copy()) +} + type ObjType byte const ( diff --git a/ethchain/state_manager.go b/ethchain/state_manager.go index c01084fc6..3be940745 100644 --- a/ethchain/state_manager.go +++ b/ethchain/state_manager.go @@ -266,7 +266,7 @@ func (sm *StateManager) ValidateBlock(block *Block) error { // Verify the nonce of the block. Return an error if it's not valid if !sm.Pow.Verify(block.HashNoNonce(), block.Difficulty, block.Nonce) { - return ValidationError("Block's nonce is invalid (= %v)", block.Nonce) + return ValidationError("Block's nonce is invalid (= %v)", ethutil.Hex(block.Nonce)) } return nil |