diff options
author | obscuren <geffobscura@gmail.com> | 2014-10-29 17:34:40 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-10-29 17:34:40 +0800 |
commit | fb4113dab4df8480c77bdcb707fa6b5408755b79 (patch) | |
tree | b369bb26e7b96826120fb08ff61739326add0e92 /ethutil/rlp.go | |
parent | 665a44646e9453e37c8a73bdd2c94ba7dc1e7c0a (diff) | |
download | dexon-fb4113dab4df8480c77bdcb707fa6b5408755b79.tar dexon-fb4113dab4df8480c77bdcb707fa6b5408755b79.tar.gz dexon-fb4113dab4df8480c77bdcb707fa6b5408755b79.tar.bz2 dexon-fb4113dab4df8480c77bdcb707fa6b5408755b79.tar.lz dexon-fb4113dab4df8480c77bdcb707fa6b5408755b79.tar.xz dexon-fb4113dab4df8480c77bdcb707fa6b5408755b79.tar.zst dexon-fb4113dab4df8480c77bdcb707fa6b5408755b79.zip |
PoC 7 updates
* Bloom
* Block restructure
* Receipts
Diffstat (limited to 'ethutil/rlp.go')
-rw-r--r-- | ethutil/rlp.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ethutil/rlp.go b/ethutil/rlp.go index 55406133b..1fff2b28a 100644 --- a/ethutil/rlp.go +++ b/ethutil/rlp.go @@ -15,6 +15,10 @@ type RlpEncodeDecode interface { RlpValue() []interface{} } +type RlpEncodable interface { + RlpData() interface{} +} + func Rlp(encoder RlpEncode) []byte { return encoder.RlpEncode() } @@ -100,6 +104,8 @@ func Encode(object interface{}) []byte { switch t := object.(type) { case *Value: buff.Write(Encode(t.Raw())) + case RlpEncodable: + buff.Write(Encode(t.RlpData())) // Code dup :-/ case int: buff.Write(Encode(big.NewInt(int64(t)))) |