From 826c827e6b1922604601f15361c962aef6f7f1a0 Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 17 Mar 2014 11:15:09 +0100 Subject: [PATCH] Added a copy method to state --- ethchain/state.go | 4 ++++ 1 file changed, 4 insertions(+) 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 (