Skip to content

Commit

Permalink
miner: do not copy nil baseFee for transactionsByPriceAndNonce
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanBSC authored and buddh0 committed Sep 13, 2023
1 parent 0d482cc commit 05e94ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion miner/ordering.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,15 @@ func (t *transactionsByPriceAndNonce) Copy() *transactionsByPriceAndNonce {
for acc, txsTmp := range t.txs {
txs[acc] = txsTmp
}
var baseFee *big.Int
if t.baseFee != nil {
baseFee = big.NewInt(0).Set(t.baseFee)
}
return &transactionsByPriceAndNonce{
heads: heads,
txs: txs,
signer: t.signer,
baseFee: big.NewInt(0).Set(t.baseFee),
baseFee: baseFee,
}
}

Expand Down

0 comments on commit 05e94ff

Please sign in to comment.