pub fn create_new_block_with_time(
utxo_set: &HashMap<OutPoint, Arc<UTXO>, FxBuildHasher>,
mempool_txs: &[Transaction],
height: u64,
prev_header: &BlockHeader,
prev_headers: &[BlockHeader],
coinbase_script: &Vec<u8>,
coinbase_address: &Vec<u8>,
block_time: u64,
) -> Result<Block, ConsensusError>Expand description
Spec-locked to Orange Paper Section 12.1: CreateNewBlockWithTime
Function ‘CreateNewBlockWithTime’ referenced but not yet in spec section 12.1 (Migration mode). Available: CreateNewBlock CreateNewBlock variant that accepts an explicit block_time.
This allows callers (e.g., node layer) to provide a median time-past or
adjusted network time instead of relying on SystemTime::now() inside
consensus code.