pub(crate) fn mining_candidate_chain_info(
non_finalized_state: &NonFinalizedState,
db: &ZebraDb,
block: &Arc<Block>,
) -> Result<(GetBlockTemplateChainInfo, PrecomputedTrees), BoxError>Expand description
Returns the GetBlockTemplateChainInfo for mining on top of block, and the note commitment
trees after block, without committing it.
block must have a valid proof of work and transaction Merkle root, and its shielded data
must be within the block limits. This checks the contextual rules for its header, which don’t
depend on its transactions being valid: it extends the best tip, its difficulty threshold and
time are the expected ones, and its header commits to the chain history and to its
authorizing data.
The returned chain info has empty chain value pools, so this returns an error if the subsidy
of the block after block depends on them.