@ -1013,21 +1013,10 @@ func (p *BlobPool) reinject(addr common.Address, txhash common.Hash) error {
return nil
}
// SetGasTip implements txpool.SubPool, allowing the blob pool's gas requirements
// to be kept in sync with the main transaction pool's gas requirements.
func ( p * BlobPool ) SetGasTip ( tip * big . Int ) {
p . lock . Lock ( )
defer p . lock . Unlock ( )
// Store the new minimum gas tip
old := p . gasTip
p . gasTip = uint256 . MustFromBig ( tip )
// If the min miner fee increased, remove transactions below the new threshold
if old == nil || p . gasTip . Cmp ( old ) > 0 {
func ( p * BlobPool ) flushTransactionsBelowTip ( tip * uint256 . Int ) {
for addr , txs := range p . index {
for i , tx := range txs {
if tx . execTipCap . Cmp ( p . gasT ip) < 0 {
if tx . execTipCap . Cmp ( tip ) < 0 {
// Drop the offending transaction
var (
ids = [ ] uint64 { tx . id }
@ -1073,11 +1062,33 @@ func (p *BlobPool) SetGasTip(tip *big.Int) {
}
}
}
// SetGasTip implements txpool.SubPool, allowing the blob pool's gas requirements
// to be kept in sync with the main transaction pool's gas requirements.
func ( p * BlobPool ) SetGasTip ( tip * big . Int ) {
p . lock . Lock ( )
defer p . lock . Unlock ( )
// Store the new minimum gas tip
old := p . gasTip
p . gasTip = uint256 . MustFromBig ( tip )
// If the min miner fee increased, remove transactions below the new threshold
if old == nil || p . gasTip . Cmp ( old ) > 0 {
p . flushTransactionsBelowTip ( p . gasTip )
}
log . Debug ( "Blobpool tip threshold updated" , "tip" , tip )
pooltipGauge . Update ( tip . Int64 ( ) )
p . updateStorageMetrics ( )
}
func ( p * BlobPool ) FlushAllTransactions ( ) {
maxUint256 := uint256 . MustFromBig ( new ( big . Int ) . Sub ( new ( big . Int ) . Lsh ( common . Big1 , 256 ) , common . Big1 ) )
p . lock . Lock ( )
defer p . lock . Unlock ( )
p . flushTransactionsBelowTip ( maxUint256 )
}
// validateTx checks whether a transaction is valid according to the consensus
// rules and adheres to some heuristic limits of the local node (price and size).
func ( p * BlobPool ) validateTx ( tx * types . Transaction ) error {