cmd, eth: fix typo

This commit is contained in:
Gary Rong 2025-12-09 14:25:37 +08:00
parent f5c228576a
commit 3e838dd1dd
2 changed files with 2 additions and 3 deletions

View file

@ -505,7 +505,7 @@ func (s *Suite) TestGetLargeReceipts(t *utesting.T) {
t.Fatalf("error reading block receipts msg: %v", err)
}
if got, want := resp.RequestId, req.RequestId; got != want {
t.Fatalf("unexpected request id in respond", got, want)
t.Fatalf("unexpected request id in respond, want: %d, got: %d", got, want)
}
for i, rc := range resp.List {

View file

@ -482,7 +482,7 @@ func (p *Peer) bufferReceiptsPacket(packet *ReceiptsPacket70, backend Backend) e
func (p *Peer) validateLastBlockReceipt(receiptLists []*ReceiptList69, id uint64, header *types.Header) (uint64, error) {
lastReceipts := receiptLists[len(receiptLists)-1]
// If the receipt is in the middle of retreival, use the buffered data.
// If the receipt is in the middle of retrieval, use the buffered data.
// e.g. [[receipt1], [receipt1, receipt2], incomplete = true]
// [[receipt3, receipt4], incomplete = true] <<--
// [[receipt5], [receipt1], incomplete = false]
@ -507,7 +507,6 @@ func (p *Peer) validateLastBlockReceipt(receiptLists []*ReceiptList69, id uint64
if previousLog+log > header.GasUsed/params.LogDataGas {
return 0, fmt.Errorf("total download receipt size exceeded the limit")
}
return previousLog + log, nil
}