diff options
Diffstat (limited to 'ethutil')
-rw-r--r-- | ethutil/config.go | 1 | ||||
-rw-r--r-- | ethutil/value.go | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/ethutil/config.go b/ethutil/config.go index 2f3d706fe..41bece21d 100644 --- a/ethutil/config.go +++ b/ethutil/config.go @@ -14,6 +14,7 @@ type ConfigManager struct { ExecPath string Debug bool Diff bool + DiffType string Paranoia bool conf *globalconf.GlobalConf 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) } |