Skip to content

Commit

Permalink
bugfix: Skip manifest & rollup calc in Prime
Browse files Browse the repository at this point in the history
  • Loading branch information
wizeguyy committed Apr 3, 2023
1 parent f2b0c74 commit a1d4b3b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,7 @@ func (w *worker) adjustGasLimit(interrupt *int32, env *environment, parent *type
}

func (w *worker) FinalizeAssembleAndBroadcast(chain consensus.ChainHeaderReader, header *types.Header, parent *types.Block, state *state.StateDB, txs []*types.Transaction, uncles []*types.Header, etxs []*types.Transaction, subManifest types.BlockManifest, receipts []*types.Receipt) (*types.Block, error) {
nodeCtx := common.NodeLocation.Context()
block, err := w.engine.FinalizeAndAssemble(chain, header, state, txs, uncles, etxs, subManifest, receipts)
if err != nil {
return nil, err
Expand All @@ -919,7 +920,11 @@ func (w *worker) FinalizeAssembleAndBroadcast(chain consensus.ChainHeaderReader,
// complete the manifest for this pending header.
var manifest types.BlockManifest
var etxRollup types.Transactions
if w.engine.IsDomCoincident(parent.Header()) {
if nodeCtx == common.PRIME_CTX {
// Nothing to do for prime chain
manifest = types.BlockManifest{}
etxRollup = types.Transactions{}
} else if w.engine.IsDomCoincident(parent.Header()) {
manifest = types.BlockManifest{parent.Hash()}
etxRollup = parent.ExtTransactions()
} else {
Expand Down

0 comments on commit a1d4b3b

Please sign in to comment.