aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-15 06:25:49 +0800
committerobscuren <geffobscura@gmail.com>2014-07-15 06:25:49 +0800
commit2784e256f1c5f8112486e9037c9b00e628e5aa10 (patch)
treefc4740c381d00efa5777159c129ab9ad2c2836dc /ethutil
parent50bc838047709796596f447ef3e60d0e4ab47fde (diff)
downloadgo-tangerine-2784e256f1c5f8112486e9037c9b00e628e5aa10.tar.gz
go-tangerine-2784e256f1c5f8112486e9037c9b00e628e5aa10.tar.zst
go-tangerine-2784e256f1c5f8112486e9037c9b00e628e5aa10.zip
Vm logging on diff
Diffstat (limited to 'ethutil')
-rw-r--r--ethutil/value.go13
1 files changed, 13 insertions, 0 deletions
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)
}