Function Ledger.buildBlock

Create a new block based on the current previous block.

Block buildBlock(Transactions) (
  Transactions txs,
  Enrollment[] enrollments,
  uint[] missing_validators
) @safe;

This function only builds a block and will not externalize it. See acceptBlock for this.

Parameters

NameDescription
txs An InputRange of Transactions
enrollments New enrollments for this block (can be null)
missing_validators Indices of slashed validators (may be null)

Returns

A newly created block based on the current block (See Ledger.lastBlock() and Ledger.height())