aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-03-17 18:15:09 +0800
committerobscuren <geffobscura@gmail.com>2014-03-17 18:15:09 +0800
commit826c827e6b1922604601f15361c962aef6f7f1a0 (patch)
treeb644d71c7e238ffbb83f09e10ae4d0fe61f04878
parent2b9b02812e9c6f81b9e5422d5bd4f5ea425412df (diff)
downloadgo-tangerine-826c827e6b1922604601f15361c962aef6f7f1a0.tar
go-tangerine-826c827e6b1922604601f15361c962aef6f7f1a0.tar.gz
go-tangerine-826c827e6b1922604601f15361c962aef6f7f1a0.tar.bz2
go-tangerine-826c827e6b1922604601f15361c962aef6f7f1a0.tar.lz
go-tangerine-826c827e6b1922604601f15361c962aef6f7f1a0.tar.xz
go-tangerine-826c827e6b1922604601f15361c962aef6f7f1a0.tar.zst
go-tangerine-826c827e6b1922604601f15361c962aef6f7f1a0.zip
Added a copy method to state
-rw-r--r--ethchain/state.go4
1 files changed, 4 insertions, 0 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 (