Skip to content

Commit

Permalink
feat(nonce-cache): rm print lines 4
Browse files Browse the repository at this point in the history
  • Loading branch information
elliothllm committed Dec 17, 2024
1 parent e527575 commit b369f02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions turbo/jsonrpc/eth_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,8 @@ type APIImpl struct {
gasTracker RpcL1GasPriceTracker
RejectLowGasPriceTransactions bool
RejectLowGasPriceTolerance float64

logLevel utils.LogLevel
}

// NewEthAPI returns APIImpl instance
Expand Down
4 changes: 1 addition & 3 deletions zk/txpool/pool_zk.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ func (p *TxPool) Trace(msg string, ctx ...interface{}) {
// for a given senderID
func (p *TxPool) onSenderStateChange(senderID uint64, senderNonce uint64, senderBalance uint256.Int, byNonce *BySenderAndNonce,
protocolBaseFee, blockGasLimit uint64, pending *PendingPool, baseFee, queued *SubPool, discard func(*metaTx, DiscardReason)) {

noGapsNonce := senderNonce
cumulativeRequiredBalance := uint256.NewInt(0)
minFeeCap := uint256.NewInt(0).SetAllOne()
Expand Down Expand Up @@ -104,7 +103,6 @@ func (p *TxPool) onSenderStateChange(senderID uint64, senderNonce uint64, sender
// the sender is M, and there are transactions for all nonces between M and N from the same
// sender. Set to 0 is the transaction's nonce is divided from the state nonce by one or more nonce gaps.
mt.subPool &^= NoNonceGaps

if noGapsNonce == mt.Tx.Nonce {
mt.subPool |= NoNonceGaps
noGapsNonce++
Expand Down Expand Up @@ -148,7 +146,6 @@ func (p *TxPool) onSenderStateChange(senderID uint64, senderNonce uint64, sender
case QueuedSubPool:
queued.Updated(mt)
}

return true
})
for _, mt := range toDel {
Expand Down Expand Up @@ -338,6 +335,7 @@ func (p *TxPool) RemoveMinedTransactions(ctx context.Context, tx kv.Tx, blockGas
}
p.onSenderStateChange(senderID, nonce, balance, p.all,
baseFee, blockGasLimit, p.pending, p.baseFee, p.queued, p.discardLocked)

}
return nil
}
Expand Down

0 comments on commit b369f02

Please sign in to comment.