Skip to content

Commit e295a40

Browse files
author
ABW
committed
fix the problem by squashing change on current_witness into common pending tx session
That way it won't be affected by status of first transaction, while still being undone prior to block application after it is produced.
1 parent 5f3c260 commit e295a40

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libraries/plugins/witness/block_producer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ void block_producer::apply_pending_transactions(const chain::account_name_type&
139139
{
140140
dgp.current_witness = witness_owner;
141141
} );
142+
// add above change to common pending tx session, otherwise it would be undone when first transaction failed
143+
_pending_tx_session->second.squash( true );
142144

143145
BOOST_SCOPE_EXIT( &_db ) { _db.clear_tx_status(); } BOOST_SCOPE_EXIT_END
144146
// the flag also covers time of processing of required and optional actions

0 commit comments

Comments
 (0)