This repository was archived by the owner on Feb 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed
src/chains/ethereum/ethereum/src/miner Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ export default class Miner extends Emittery<{
146146 this . #executables = executables ;
147147 this . #createBlock = ( previousBlock : Block ) => {
148148 const newBlock = createBlock ( previousBlock ) ;
149- this . #setCurrentBlockBaseFeePerGas ( newBlock ) ;
149+ this . #currentBlockBaseFeePerGas = newBlock . header . baseFeePerGas ;
150150 return newBlock ;
151151 } ;
152152
@@ -179,7 +179,7 @@ export default class Miner extends Emittery<{
179179 this . #updatePricedHeap( ) ;
180180 return ;
181181 } else {
182- this . #setCurrentBlockBaseFeePerGas ( block ) ;
182+ this . #currentBlockBaseFeePerGas = block . header . baseFeePerGas ;
183183 this . #setPricedHeap( ) ;
184184 const result = await this . #mine( block , maxTransactions , onlyOneBlock ) ;
185185 this . emit ( "idle" ) ;
@@ -581,15 +581,4 @@ export default class Miner extends Emittery<{
581581 public toggleStepEvent ( enable : boolean ) {
582582 this . #emitStepEvent = enable ;
583583 }
584-
585- /**
586- * Sets the #currentBlockBaseFeePerGas property if the current block
587- * has a baseFeePerGas property
588- */
589- #setCurrentBlockBaseFeePerGas = ( block : RuntimeBlock ) => {
590- const baseFeePerGas = block . header . baseFeePerGas ;
591- // before london hard fork, there will be no baseFeePerGas on the block
592- this . #currentBlockBaseFeePerGas =
593- baseFeePerGas === undefined ? undefined : baseFeePerGas ;
594- } ;
595584}
You can’t perform that action at this time.
0 commit comments