File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,12 @@ func (miner *Miner) prepareWork(genParams *generateParams) (*environment, error)
167167 header .GasLimit = core .CalcGasLimit (parentGasLimit , miner .config .GasCeil )
168168 }
169169 }
170+ // Run the consensus preparation with the default or customized consensus engine.
171+ // Note that the `header.Time` may be changed.
172+ if err := miner .engine .Prepare (miner .chain , header ); err != nil {
173+ log .Error ("Failed to prepare header for sealing" , "err" , err )
174+ return nil , err
175+ }
170176 // Apply EIP-4844, EIP-4788.
171177 if miner .chainConfig .IsCancun (header .Number , header .Time ) {
172178 var excessBlobGas uint64
@@ -180,11 +186,6 @@ func (miner *Miner) prepareWork(genParams *generateParams) (*environment, error)
180186 header .ExcessBlobGas = & excessBlobGas
181187 header .ParentBeaconRoot = genParams .beaconRoot
182188 }
183- // Run the consensus preparation with the default or customized consensus engine.
184- if err := miner .engine .Prepare (miner .chain , header ); err != nil {
185- log .Error ("Failed to prepare header for sealing" , "err" , err )
186- return nil , err
187- }
188189 // Could potentially happen if starting to mine in an odd state.
189190 // Note genParams.coinbase can be different with header.Coinbase
190191 // since clique algorithm can modify the coinbase field in header.
You can’t perform that action at this time.
0 commit comments