mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-13 10:21:37 +00:00
eth/protocols/eth: improving comments
This commit is contained in:
parent
5bb2cf35ab
commit
9d2b04de29
1 changed files with 4 additions and 2 deletions
|
|
@ -551,16 +551,17 @@ func handleReceipts70(backend Backend, msg Decoder, peer *Peer) error {
|
|||
if err := peer.tracker.Fulfil(tresp); err != nil {
|
||||
return fmt.Errorf("Receipts: %w", err)
|
||||
}
|
||||
|
||||
receiptLists, err := res.List.Items()
|
||||
if err != nil {
|
||||
return fmt.Errorf("Receipts: %w", err)
|
||||
}
|
||||
|
||||
if err := peer.bufferReceipts(res.RequestId, receiptLists, res.LastBlockIncomplete, backend); err != nil {
|
||||
err = peer.bufferReceipts(res.RequestId, receiptLists, res.LastBlockIncomplete, backend)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if res.LastBlockIncomplete {
|
||||
// Request the remaining receipts from the same peer.
|
||||
return peer.requestPartialReceipts(res.RequestId)
|
||||
}
|
||||
if complete := peer.flushReceipts(res.RequestId); complete != nil {
|
||||
|
|
@ -570,6 +571,7 @@ func handleReceipts70(backend Backend, msg Decoder, peer *Peer) error {
|
|||
return dispatchReceipts(res.RequestId, receiptLists, peer)
|
||||
}
|
||||
|
||||
// dispatchReceipts submits a receipt response to the dispatcher.
|
||||
func dispatchReceipts(requestId uint64, receiptLists []*ReceiptList, peer *Peer) error {
|
||||
metadata := func() interface{} {
|
||||
hasher := trie.NewStackTrie(nil)
|
||||
|
|
|
|||
Loading…
Reference in a new issue