|
|
@ -584,9 +584,8 @@ func (ethash *Ethash) Finalize(chain consensus.ChainHeaderReader, header *types. |
|
|
|
// FinalizeAndAssemble implements consensus.Engine, accumulating the block and
|
|
|
|
// FinalizeAndAssemble implements consensus.Engine, accumulating the block and
|
|
|
|
// uncle rewards, setting the final state and assembling the block.
|
|
|
|
// uncle rewards, setting the final state and assembling the block.
|
|
|
|
func (ethash *Ethash) FinalizeAndAssemble(chain consensus.ChainHeaderReader, header *types.Header, state *state.StateDB, txs []*types.Transaction, uncles []*types.Header, receipts []*types.Receipt) (*types.Block, error) { |
|
|
|
func (ethash *Ethash) FinalizeAndAssemble(chain consensus.ChainHeaderReader, header *types.Header, state *state.StateDB, txs []*types.Transaction, uncles []*types.Header, receipts []*types.Receipt) (*types.Block, error) { |
|
|
|
// Accumulate any block and uncle rewards and commit the final state root
|
|
|
|
// Finalize block
|
|
|
|
accumulateRewards(chain.Config(), state, header, uncles) |
|
|
|
ethash.Finalize(chain, header, state, txs, uncles) |
|
|
|
header.Root = state.IntermediateRoot(chain.Config().IsEIP158(header.Number)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Header seems complete, assemble into a block and return
|
|
|
|
// Header seems complete, assemble into a block and return
|
|
|
|
return types.NewBlock(header, txs, uncles, receipts, new(trie.Trie)), nil |
|
|
|
return types.NewBlock(header, txs, uncles, receipts, new(trie.Trie)), nil |
|
|
|