aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-03-20 20:33:11 +0800
committerFelix Lange <fjl@twurst.com>2015-03-20 21:00:26 +0800
commitc161d73d429ef421cdb9c75b743c16d72aa8a89a (patch)
tree266404447d1e2843b347e11892ff393aabd61a23 /common
parentdcb9614dfec3c8dcaaa47e9fa516528fdc47279b (diff)
downloadgo-tangerine-c161d73d429ef421cdb9c75b743c16d72aa8a89a.tar
go-tangerine-c161d73d429ef421cdb9c75b743c16d72aa8a89a.tar.gz
go-tangerine-c161d73d429ef421cdb9c75b743c16d72aa8a89a.tar.bz2
go-tangerine-c161d73d429ef421cdb9c75b743c16d72aa8a89a.tar.lz
go-tangerine-c161d73d429ef421cdb9c75b743c16d72aa8a89a.tar.xz
go-tangerine-c161d73d429ef421cdb9c75b743c16d72aa8a89a.tar.zst
go-tangerine-c161d73d429ef421cdb9c75b743c16d72aa8a89a.zip
common: drop accessors for Value.Val
I don't see why we would need two different accessors for a public field.
Diffstat (limited to 'common')
-rw-r--r--common/rlp.go2
-rw-r--r--common/value.go8
-rw-r--r--common/value_test.go2
3 files changed, 2 insertions, 10 deletions
diff --git a/common/rlp.go b/common/rlp.go
index 602f13202..06ac410e9 100644
--- a/common/rlp.go
+++ b/common/rlp.go
@@ -112,7 +112,7 @@ func Encode(object interface{}) []byte {
if object != nil {
switch t := object.(type) {
case *Value:
- buff.Write(Encode(t.Raw()))
+ buff.Write(Encode(t.Val))
case RlpEncodable:
buff.Write(Encode(t.RlpData()))
// Code dup :-/
diff --git a/common/value.go b/common/value.go
index 722e641b5..c3893d565 100644
--- a/common/value.go
+++ b/common/value.go
@@ -57,14 +57,6 @@ func (val *Value) Len() int {
return len(val.Bytes())
}
-func (val *Value) Raw() interface{} {
- return val.Val
-}
-
-func (val *Value) Interface() interface{} {
- return val.Val
-}
-
func (val *Value) Uint() uint64 {
if Val, ok := val.Val.(uint8); ok {
return uint64(Val)
diff --git a/common/value_test.go b/common/value_test.go
index 09d37802d..38a0e9843 100644
--- a/common/value_test.go
+++ b/common/value_test.go
@@ -35,7 +35,7 @@ func (s *ValueSuite) TestValueTypes(c *checker.C) {
c.Assert(str.Str(), checker.Equals, strExp)
c.Assert(num.Uint(), checker.Equals, numExp)
- c.Assert(NewValue(inter.Interface()).Cmp(NewValue(interExp)), checker.Equals, true)
+ c.Assert(NewValue(inter.Val).Cmp(NewValue(interExp)), checker.Equals, true)
c.Assert(byt.Bytes(), checker.DeepEquals, bytExp)
c.Assert(bigInt.BigInt(), checker.DeepEquals, bigExp)
}