Skip to content

Commit

Permalink
Merge pull request #2531 from bitshares/release
Browse files Browse the repository at this point in the history
merge release branch into testnet branch
  • Loading branch information
abitmore authored Nov 6, 2021
2 parents a7884c6 + 628feea commit 08e62a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libraries/chain/db_block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -613,15 +613,16 @@ void database::_apply_block( const signed_block& next_block )

_issue_453_affected_assets.clear();

for( const auto& trx : next_block.transactions )
signed_block processed_block( next_block ); // make a copy
for( auto& trx : processed_block.transactions )
{
/* We do not need to push the undo state for each transaction
* because they either all apply and are valid or the
* entire block fails to apply. We only need an "undo" state
* for transactions when validating broadcast transactions or
* when building a block.
*/
apply_transaction( trx, skip );
trx.operation_results = apply_transaction( trx, skip ).operation_results;
++_current_trx_in_block;
}

Expand Down Expand Up @@ -661,7 +662,7 @@ void database::_apply_block( const signed_block& next_block )
apply_debug_updates();

// notify observers that the block has been applied
notify_applied_block( next_block ); //emit
notify_applied_block( processed_block ); //emit
_applied_ops.clear();

notify_changed_objects();
Expand Down
3 changes: 3 additions & 0 deletions tests/tests/network_broadcast_api_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ BOOST_AUTO_TEST_CASE( broadcast_transaction_with_callback_test ) {
auto callback = [&]( const variant& v )
{
++called;
idump((v));
auto callback_obj = v.as<graphene::app::network_broadcast_api::transaction_confirmation>(200);
BOOST_CHECK_EQUAL( callback_obj.trx.operations.size(), callback_obj.trx.operation_results.size() );
};

fc::ecc::private_key cid_key = fc::ecc::private_key::regenerate( fc::digest("key") );
Expand Down

0 comments on commit 08e62a2

Please sign in to comment.