aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil/value.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-02-15 20:21:11 +0800
committerobscuren <geffobscura@gmail.com>2014-02-15 20:21:11 +0800
commit07c12f0b921a05aec668ae8ce63b6dfac51d76a6 (patch)
tree48f9b9b9eee50353e79a847bf94d31c1e4e0d2c3 /ethutil/value.go
parent5883446b219a2980d67ff604c7f227089e5c8619 (diff)
downloaddexon-07c12f0b921a05aec668ae8ce63b6dfac51d76a6.tar.gz
dexon-07c12f0b921a05aec668ae8ce63b6dfac51d76a6.tar.zst
dexon-07c12f0b921a05aec668ae8ce63b6dfac51d76a6.zip
Added trie tests, value tests
Diffstat (limited to 'ethutil/value.go')
-rw-r--r--ethutil/value.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/ethutil/value.go b/ethutil/value.go
index 2a990783e..f91c33983 100644
--- a/ethutil/value.go
+++ b/ethutil/value.go
@@ -60,6 +60,10 @@ func (val *Value) Uint() uint64 {
return uint64(Val)
} else if Val, ok := val.Val.(uint64); ok {
return Val
+ } else if Val, ok := val.Val.(int); ok {
+ return uint64(Val)
+ } else if Val, ok := val.Val.(uint); ok {
+ return uint64(Val)
} else if Val, ok := val.Val.([]byte); ok {
return ReadVarint(bytes.NewReader(Val))
}