@@ -3949,7 +3949,7 @@ namespace eosio {
3949
3949
void connection::handle_message ( const block_id_type& id, signed_block_ptr ptr ) {
3950
3950
// post to dispatcher strand so that we don't have multiple threads validating the block header
3951
3951
peer_dlog (this , " posting block ${n} to dispatcher strand" , (" n" , ptr->block_num ()));
3952
- my_impl->dispatcher .strand .post ([id, c{shared_from_this ()}, ptr{std::move (ptr)}, cid=connection_id]() mutable {
3952
+ my_impl->dispatcher .strand .dispatch ([id, c{shared_from_this ()}, ptr{std::move (ptr)}, cid=connection_id]() mutable {
3953
3953
if (app ().is_quiting ()) // large sync span can have many of these queued up, exit quickly
3954
3954
return ;
3955
3955
controller& cc = my_impl->chain_plug ->chain ();
@@ -4028,11 +4028,9 @@ namespace eosio {
4028
4028
c->block_status_monitor_ .accepted ();
4029
4029
4030
4030
if (my_impl->chain_plug ->chain ().get_read_mode () == db_read_mode::IRREVERSIBLE) {
4031
- // non-irreversible notifies sync_manager when block is applied
4032
- my_impl->dispatcher .strand .post ([sync_master = my_impl->sync_master .get (), bh=*obh]() {
4033
- const fc::microseconds age (fc::time_point::now () - bh.timestamp ());
4034
- sync_master->sync_recv_block (connection_ptr{}, bh.id (), bh.block_num (), age);
4035
- });
4031
+ // non-irreversible notifies sync_manager when block is applied, call on dispatcher strand
4032
+ const fc::microseconds age (fc::time_point::now () - obh->timestamp ());
4033
+ my_impl->sync_master ->sync_recv_block (connection_ptr{}, obh->id (), obh->block_num (), age);
4036
4034
}
4037
4035
4038
4036
if (fork_db_add_result == fork_db_add_t ::appended_to_head || fork_db_add_result == fork_db_add_t ::fork_switch) {
0 commit comments