db_block.cpp: Add some comments
This commit is contained in:
parent
35acfff060
commit
4c619414ae
1 changed files with 8 additions and 0 deletions
|
|
@ -353,8 +353,15 @@ signed_block database::_generate_block(
|
||||||
{
|
{
|
||||||
wlog( "Postponed ${n} transactions due to block size limit", ("n", postponed_tx_count) );
|
wlog( "Postponed ${n} transactions due to block size limit", ("n", postponed_tx_count) );
|
||||||
}
|
}
|
||||||
|
|
||||||
_pending_tx_session.reset();
|
_pending_tx_session.reset();
|
||||||
|
|
||||||
|
// We have temporarily broken the invariant that
|
||||||
|
// _pending_tx_session is the result of applying _pending_tx, as
|
||||||
|
// _pending_tx now consists of the set of postponed transactions.
|
||||||
|
// However, the push_block() call below will re-create the
|
||||||
|
// _pending_tx_session.
|
||||||
|
|
||||||
pending_block.previous = head_block_id();
|
pending_block.previous = head_block_id();
|
||||||
pending_block.timestamp = when;
|
pending_block.timestamp = when;
|
||||||
pending_block.transaction_merkle_root = pending_block.calculate_merkle_root();
|
pending_block.transaction_merkle_root = pending_block.calculate_merkle_root();
|
||||||
|
|
@ -363,6 +370,7 @@ signed_block database::_generate_block(
|
||||||
if( !(skip & skip_witness_signature) )
|
if( !(skip & skip_witness_signature) )
|
||||||
pending_block.sign( block_signing_private_key );
|
pending_block.sign( block_signing_private_key );
|
||||||
|
|
||||||
|
// TODO: Move this to _push_block() so session is restored.
|
||||||
FC_ASSERT( fc::raw::pack_size(pending_block) <= get_global_properties().parameters.maximum_block_size );
|
FC_ASSERT( fc::raw::pack_size(pending_block) <= get_global_properties().parameters.maximum_block_size );
|
||||||
|
|
||||||
push_block( pending_block, skip );
|
push_block( pending_block, skip );
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue