@@ -206,7 +206,7 @@ type worker struct {
206
206
mu sync.RWMutex // The lock used to protect the coinbase and extra fields
207
207
coinbase common.Address
208
208
extra []byte
209
- tip * big .Int // Minimum tip needed for non-local transaction to include them
209
+ tip * uint256 .Int // Minimum tip needed for non-local transaction to include them
210
210
211
211
pendingMu sync.RWMutex
212
212
pendingTasks map [common.Hash ]* task
@@ -253,7 +253,7 @@ func newWorker(config *Config, chainConfig *params.ChainConfig, engine consensus
253
253
isLocalBlock : isLocalBlock ,
254
254
coinbase : config .Etherbase ,
255
255
extra : config .ExtraData ,
256
- tip : config .GasPrice ,
256
+ tip : uint256 . MustFromBig ( config .GasPrice ) ,
257
257
pendingTasks : make (map [common.Hash ]* task ),
258
258
txsCh : make (chan core.NewTxsEvent , txChanSize ),
259
259
chainHeadCh : make (chan core.ChainHeadEvent , chainHeadChanSize ),
@@ -334,7 +334,7 @@ func (w *worker) setExtra(extra []byte) {
334
334
func (w * worker ) setGasTip (tip * big.Int ) {
335
335
w .mu .Lock ()
336
336
defer w .mu .Unlock ()
337
- w .tip = tip
337
+ w .tip = uint256 . MustFromBig ( tip )
338
338
}
339
339
340
340
// setRecommitInterval updates the interval for miner sealing work recommitting.
@@ -556,15 +556,15 @@ func (w *worker) mainLoop() {
556
556
Hash : tx .Hash (),
557
557
Tx : nil , // Do *not* set this! We need to resolve it later to pull blobs in
558
558
Time : tx .Time (),
559
- GasFeeCap : tx .GasFeeCap (),
560
- GasTipCap : tx .GasTipCap (),
559
+ GasFeeCap : uint256 . MustFromBig ( tx .GasFeeCap () ),
560
+ GasTipCap : uint256 . MustFromBig ( tx .GasTipCap () ),
561
561
Gas : tx .Gas (),
562
562
BlobGas : tx .BlobGas (),
563
563
})
564
564
}
565
565
txset := newTransactionsByPriceAndNonce (w .current .signer , txs , w .current .header .BaseFee )
566
566
tcount := w .current .tcount
567
- w .commitTransactions (w .current , txset , nil , new (big .Int ))
567
+ w .commitTransactions (w .current , txset , nil , new (uint256 .Int ))
568
568
569
569
// Only update the snapshot if any new transactions were added
570
570
// to the pending block
@@ -802,7 +802,7 @@ func (w *worker) applyTransaction(env *environment, tx *types.Transaction) (*typ
802
802
return receipt , err
803
803
}
804
804
805
- func (w * worker ) commitTransactions (env * environment , txs * transactionsByPriceAndNonce , interrupt * atomic.Int32 , minTip * big .Int ) error {
805
+ func (w * worker ) commitTransactions (env * environment , txs * transactionsByPriceAndNonce , interrupt * atomic.Int32 , minTip * uint256 .Int ) error {
806
806
gasLimit := env .header .GasLimit
807
807
if env .gasPool == nil {
808
808
env .gasPool = new (core.GasPool ).AddGas (gasLimit )
@@ -1013,7 +1013,7 @@ func (w *worker) fillTransactions(interrupt *atomic.Int32, env *environment) err
1013
1013
if env .header .ExcessBlobGas != nil {
1014
1014
blobFee = uint256 .MustFromBig (eip4844 .CalcBlobFee (* env .header .ExcessBlobGas ))
1015
1015
}
1016
- pending := w .eth .TxPool ().Pending (uint256 . MustFromBig ( tip ) , baseFee , blobFee )
1016
+ pending := w .eth .TxPool ().Pending (tip , baseFee , blobFee )
1017
1017
1018
1018
// Split the pending transactions into locals and remotes.
1019
1019
localTxs , remoteTxs := make (map [common.Address ][]* txpool.LazyTransaction ), pending
@@ -1027,7 +1027,7 @@ func (w *worker) fillTransactions(interrupt *atomic.Int32, env *environment) err
1027
1027
// Fill the block with all available pending transactions.
1028
1028
if len (localTxs ) > 0 {
1029
1029
txs := newTransactionsByPriceAndNonce (env .signer , localTxs , env .header .BaseFee )
1030
- if err := w .commitTransactions (env , txs , interrupt , new (big .Int )); err != nil {
1030
+ if err := w .commitTransactions (env , txs , interrupt , new (uint256 .Int )); err != nil {
1031
1031
return err
1032
1032
}
1033
1033
}
0 commit comments