diff --git a/libraries/chain/db_block.cpp b/libraries/chain/db_block.cpp index 33403edf..f55f0396 100644 --- a/libraries/chain/db_block.cpp +++ b/libraries/chain/db_block.cpp @@ -556,12 +556,17 @@ void database::notify_changed_objects() vector changed_ids; changed_ids.reserve(head_undo.old_values.size()); for( const auto& item : head_undo.old_values ) changed_ids.push_back(item.first); + vector removed_ids; removed_ids.reserve( head_undo.removed.size() ); vector removed; removed.reserve( head_undo.removed.size() ); - for( const auto& item : head_undo.removed ) removed.emplace_back( item.second.get() ); + for( const auto& item : head_undo.removed ) + { + removed_ids.emplace_back( item.first ); + removed.emplace_back( item.second.get() ); + } new_objects(new_ids); changed_objects(changed_ids); - removed_objects(removed); + removed_objects(removed_ids, removed); } } FC_CAPTURE_AND_LOG( () ) } diff --git a/libraries/chain/include/graphene/chain/database.hpp b/libraries/chain/include/graphene/chain/database.hpp index 47fd63b9..9e0f1af1 100644 --- a/libraries/chain/include/graphene/chain/database.hpp +++ b/libraries/chain/include/graphene/chain/database.hpp @@ -204,7 +204,7 @@ namespace graphene { namespace chain { /** this signal is emitted any time an object is removed and contains a * pointer to the last value of every object that was removed. */ - fc::signal&)> removed_objects; + fc::signal&, const vector&)> removed_objects; //////////////////// db_witness_schedule.cpp ////////////////////