From 2784e256f1c5f8112486e9037c9b00e628e5aa10 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 15 Jul 2014 00:25:49 +0200 Subject: Vm logging on diff --- ethutil/value.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'ethutil') diff --git a/ethutil/value.go b/ethutil/value.go index b37b33c28..ecb9d1511 100644 --- a/ethutil/value.go +++ b/ethutil/value.go @@ -190,6 +190,19 @@ func (val *Value) Get(idx int) *Value { return NewValue(nil) } +func (self *Value) Copy() *Value { + switch val := self.Val.(type) { + case *big.Int: + return NewValue(new(big.Int).Set(val)) + case []byte: + return NewValue(CopyBytes(val)) + default: + return NewValue(self.Val) + } + + return nil +} + func (val *Value) Cmp(o *Value) bool { return reflect.DeepEqual(val.Val, o.Val) } -- cgit