mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-17 18:30:45 +00:00
eth/protocols/eth: unexport encodeForHash
This commit is contained in:
parent
c8e956d6a9
commit
3348638509
1 changed files with 3 additions and 3 deletions
|
|
@ -46,8 +46,8 @@ func newReceipt(tr *types.Receipt) Receipt {
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|
||||||
// EncodeForHash encodes a receipt for the block receiptsRoot derivation.
|
// encodeForHash encodes a receipt for the block receiptsRoot derivation.
|
||||||
func (r *Receipt) EncodeForHash(bloomBuf *[6]byte, out *bytes.Buffer) {
|
func (r *Receipt) encodeForHash(bloomBuf *[6]byte, out *bytes.Buffer) {
|
||||||
// For typed receipts, add the tx type.
|
// For typed receipts, add the tx type.
|
||||||
if r.TxType != 0 {
|
if r.TxType != 0 {
|
||||||
out.WriteByte(r.TxType)
|
out.WriteByte(r.TxType)
|
||||||
|
|
@ -157,7 +157,7 @@ func writeReceiptForHash(bloomBuf *[6]byte) func([]byte, *bytes.Buffer) {
|
||||||
return func(data []byte, outbuf *bytes.Buffer) {
|
return func(data []byte, outbuf *bytes.Buffer) {
|
||||||
var r Receipt
|
var r Receipt
|
||||||
if rlp.DecodeBytes(data, &r) == nil {
|
if rlp.DecodeBytes(data, &r) == nil {
|
||||||
r.EncodeForHash(bloomBuf, outbuf)
|
r.encodeForHash(bloomBuf, outbuf)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue