aboutsummaryrefslogtreecommitdiffstats
path: root/core/types
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-12-11 08:29:41 +0800
committerFelix Lange <fjl@twurst.com>2015-12-18 19:09:10 +0800
commit1b89bd5d269d2d85a7c72067e18212135d8757f9 (patch)
treeb6d3cf1bd43f14699f6a5fdcb7a6232c6b6c1044 /core/types
parent9be5d5cd90517244b239c6af4e602d898fafeaf7 (diff)
downloadgo-tangerine-1b89bd5d269d2d85a7c72067e18212135d8757f9.tar
go-tangerine-1b89bd5d269d2d85a7c72067e18212135d8757f9.tar.gz
go-tangerine-1b89bd5d269d2d85a7c72067e18212135d8757f9.tar.bz2
go-tangerine-1b89bd5d269d2d85a7c72067e18212135d8757f9.tar.lz
go-tangerine-1b89bd5d269d2d85a7c72067e18212135d8757f9.tar.xz
go-tangerine-1b89bd5d269d2d85a7c72067e18212135d8757f9.tar.zst
go-tangerine-1b89bd5d269d2d85a7c72067e18212135d8757f9.zip
core/state, core/types use package rlp for state, receipt serialisation
Diffstat (limited to 'core/types')
-rw-r--r--core/types/receipt.go15
1 files changed, 6 insertions, 9 deletions
diff --git a/core/types/receipt.go b/core/types/receipt.go
index e7d5203a3..5f847fc5c 100644
--- a/core/types/receipt.go
+++ b/core/types/receipt.go
@@ -125,17 +125,14 @@ func (r *ReceiptForStorage) DecodeRLP(s *rlp.Stream) error {
// Receipts is a wrapper around a Receipt array to implement types.DerivableList.
type Receipts []*Receipt
-// RlpEncode implements common.RlpEncode required for SHA3 derivation.
-func (r Receipts) RlpEncode() []byte {
- bytes, err := rlp.EncodeToBytes(r)
+// Len returns the number of receipts in this list.
+func (r Receipts) Len() int { return len(r) }
+
+// GetRlp returns the RLP encoding of one receipt from the list.
+func (r Receipts) GetRlp(i int) []byte {
+ bytes, err := rlp.EncodeToBytes(r[i])
if err != nil {
panic(err)
}
return bytes
}
-
-// Len returns the number of receipts in this list.
-func (r Receipts) Len() int { return len(r) }
-
-// GetRlp returns the RLP encoding of one receipt from the list.
-func (r Receipts) GetRlp(i int) []byte { return common.Rlp(r[i]) }