aboutsummaryrefslogtreecommitdiffstats
path: root/core/types
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-10-13 17:04:25 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-10-21 21:49:55 +0800
commit5b0ee8ec304663898073b7a4c659e1def23716df (patch)
tree8f2f49a8d26dc1c29e1d360fb787ab420d90a2ae /core/types
parentaa0538db0b5de2bb2c609d629b65d083649f9171 (diff)
downloaddexon-5b0ee8ec304663898073b7a4c659e1def23716df.tar
dexon-5b0ee8ec304663898073b7a4c659e1def23716df.tar.gz
dexon-5b0ee8ec304663898073b7a4c659e1def23716df.tar.bz2
dexon-5b0ee8ec304663898073b7a4c659e1def23716df.tar.lz
dexon-5b0ee8ec304663898073b7a4c659e1def23716df.tar.xz
dexon-5b0ee8ec304663898073b7a4c659e1def23716df.tar.zst
dexon-5b0ee8ec304663898073b7a4c659e1def23716df.zip
core, eth, trie: fix data races and merge/review issues
Diffstat (limited to 'core/types')
-rw-r--r--core/types/receipt.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/types/receipt.go b/core/types/receipt.go
index aea5b3e91..e7d5203a3 100644
--- a/core/types/receipt.go
+++ b/core/types/receipt.go
@@ -67,7 +67,7 @@ func (r *Receipt) DecodeRLP(s *rlp.Stream) error {
return nil
}
-// RlpEncode implements common.RlpEncode required for SHA derivation.
+// RlpEncode implements common.RlpEncode required for SHA3 derivation.
func (r *Receipt) RlpEncode() []byte {
bytes, err := rlp.EncodeToBytes(r)
if err != nil {
@@ -82,7 +82,7 @@ func (r *Receipt) String() string {
}
// ReceiptForStorage is a wrapper around a Receipt that flattens and parses the
-// entire content of a receipt, opposed to only the consensus fields originally.
+// entire content of a receipt, as opposed to only the consensus fields originally.
type ReceiptForStorage Receipt
// EncodeRLP implements rlp.Encoder, and flattens all content fields of a receipt
@@ -95,8 +95,8 @@ func (r *ReceiptForStorage) EncodeRLP(w io.Writer) error {
return rlp.Encode(w, []interface{}{r.PostState, r.CumulativeGasUsed, r.Bloom, r.TxHash, r.ContractAddress, logs, r.GasUsed})
}
-// DecodeRLP implements rlp.Decoder, and loads the consensus fields of a receipt
-// from an RLP stream.
+// DecodeRLP implements rlp.Decoder, and loads both consensus and implementation
+// fields of a receipt from an RLP stream.
func (r *ReceiptForStorage) DecodeRLP(s *rlp.Stream) error {
var receipt struct {
PostState []byte
@@ -125,7 +125,7 @@ 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 SHA derivation.
+// RlpEncode implements common.RlpEncode required for SHA3 derivation.
func (r Receipts) RlpEncode() []byte {
bytes, err := rlp.EncodeToBytes(r)
if err != nil {