delete buffer when validation failed

This commit is contained in:
healthykim 2026-02-24 18:21:24 +09:00
parent 48da785c86
commit 7609febf20

View file

@ -458,6 +458,7 @@ func (p *Peer) bufferReceipts(requestId uint64, receiptLists []*ReceiptList69, l
gasUsed := buffer.gasUsed[lastBlock] gasUsed := buffer.gasUsed[lastBlock]
logSize, err := p.validateLastBlockReceipt(receiptLists, requestId, gasUsed) logSize, err := p.validateLastBlockReceipt(receiptLists, requestId, gasUsed)
if err != nil { if err != nil {
delete(p.receiptBuffer, requestId)
return err return err
} }
// Update the buffered data and trim the packet to exclude the incomplete block. // Update the buffered data and trim the packet to exclude the incomplete block.