aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil/value.go
diff options
context:
space:
mode:
authorMaran <maran.hidskes@gmail.com>2014-04-01 20:20:55 +0800
committerMaran <maran.hidskes@gmail.com>2014-04-01 20:20:55 +0800
commit0a8801082676d64f904cbb5b62c1159e0bbd7788 (patch)
tree05e9c4ea80d5e01cca53d583318f43606418a19e /ethutil/value.go
parent5f49a659c36dbfb8c330ddc3d4565c19a9a936b5 (diff)
parent7277c420479239fbea78417e42c43ee0162c2728 (diff)
downloaddexon-0a8801082676d64f904cbb5b62c1159e0bbd7788.tar.gz
dexon-0a8801082676d64f904cbb5b62c1159e0bbd7788.tar.zst
dexon-0a8801082676d64f904cbb5b62c1159e0bbd7788.zip
Merge conflicts
Diffstat (limited to 'ethutil/value.go')
-rw-r--r--ethutil/value.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/ethutil/value.go b/ethutil/value.go
index 46681ec2a..04131aba9 100644
--- a/ethutil/value.go
+++ b/ethutil/value.go
@@ -149,6 +149,15 @@ func (val *Value) IsStr() bool {
return val.Type() == reflect.String
}
+// Special list checking function. Something is considered
+// a list if it's of type []interface{}. The list is usually
+// used in conjunction with rlp decoded streams.
+func (val *Value) IsList() bool {
+ _, ok := val.Val.([]interface{})
+
+ return ok
+}
+
func (val *Value) IsEmpty() bool {
return val.Val == nil || ((val.IsSlice() || val.IsStr()) && val.Len() == 0)
}