Skip to content

Commit

Permalink
miner/worker: changes to miner
Browse files Browse the repository at this point in the history
  • Loading branch information
lightclient committed May 14, 2024
1 parent 2db3468 commit 4bd12ed
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,20 @@ func (miner *Miner) generateWork(params *generateParams) *newPayloadResult {
log.Warn("Block building is interrupted", "allowance", common.PrettyDuration(miner.config.Recommit))
}
}

body := types.Body{Transactions: work.txs, Withdrawals: params.withdrawals}
allLogs := make([]*types.Log, 0)
for _, r := range work.receipts {
allLogs = append(allLogs, r.Logs...)
}
// Read requests if Prague is enabled.
if miner.chainConfig.IsPrague(work.header.Number, work.header.Time) {
requests, err := core.ParseDepositLogs(allLogs)
if err != nil {
return &newPayloadResult{err: err}
}
body.Requests = requests
}
block, err := miner.engine.FinalizeAndAssemble(miner.chain, work.header, work.state, &body, work.receipts)
if err != nil {
return &newPayloadResult{err: err}
Expand Down

0 comments on commit 4bd12ed

Please sign in to comment.