mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
eth/protocols/eth: fix crash
This commit is contained in:
parent
6cd2580b2b
commit
0cffccf6c0
1 changed files with 3 additions and 3 deletions
|
|
@ -420,8 +420,8 @@ func handleReceipts69(backend Backend, msg Decoder, peer *Peer) error {
|
||||||
}
|
}
|
||||||
// only use one buffer
|
// only use one buffer
|
||||||
buffers := new(receiptListBuffers)
|
buffers := new(receiptListBuffers)
|
||||||
for _, rl := range res.List {
|
for i := range res.List {
|
||||||
rl.buf = buffers
|
res.List[i].buf = buffers
|
||||||
}
|
}
|
||||||
metadata := func() interface{} {
|
metadata := func() interface{} {
|
||||||
hasher := trie.NewStackTrie(nil)
|
hasher := trie.NewStackTrie(nil)
|
||||||
|
|
@ -432,7 +432,7 @@ func handleReceipts69(backend Backend, msg Decoder, peer *Peer) error {
|
||||||
return hashes
|
return hashes
|
||||||
}
|
}
|
||||||
// TODO this can probably be made 0-alloc.
|
// TODO this can probably be made 0-alloc.
|
||||||
var enc []rlp.RawValue
|
var enc ReceiptsRLPResponse
|
||||||
for _, blockReceipts := range res.List {
|
for _, blockReceipts := range res.List {
|
||||||
enc = append(enc, blockReceipts.toStorageReceiptsRLP())
|
enc = append(enc, blockReceipts.toStorageReceiptsRLP())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue