Skip to content

Commit

Permalink
core/txpool/blobpool: fix off by one clause
Browse files Browse the repository at this point in the history
  • Loading branch information
karalabe committed Jul 6, 2023
1 parent 4285f57 commit 15ef630
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/txpool/blobpool/blobpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@ func (p *BlobPool) add(tx *types.Transaction, blobs []kzg4844.Blob, commits []kz
case len(txs) == 1: // 1 tx and not a new acc, must be replacement
heap.Fix(p.evict, p.evict.index[from])

case offset == len(txs): // either append or last tx replacement
case offset == len(txs)-1: // either append or last tx replacement
evictionExecFeeDiff := txs[offset-1].evictionExecFeeJumps - txs[offset].evictionExecFeeJumps
evictionBlobFeeDiff := txs[offset-1].evictionBlobFeeJumps - txs[offset].evictionBlobFeeJumps

Expand Down

0 comments on commit 15ef630

Please sign in to comment.