Remove unnecessary observer subscriptions to reduce a bit of locking overhead

This commit is contained in:
cryptocode 2018-07-20 11:12:56 +02:00 committed by Lee Bousfield
commit 76fcc11b42

View file

@ -1708,13 +1708,9 @@ stats (config.stat_config)
this->network.send_keepalive (endpoint_a);
rep_query (*this, endpoint_a);
});
observers.vote.add ([this](std::shared_ptr<rai::vote> vote_a, rai::endpoint const &) {
this->gap_cache.vote (vote_a);
});
observers.vote.add ([this](std::shared_ptr<rai::vote> vote_a, rai::endpoint const &) {
this->online_reps.vote (vote_a);
});
observers.vote.add ([this](std::shared_ptr<rai::vote> vote_a, rai::endpoint const & endpoint_a) {
this->gap_cache.vote (vote_a);
this->online_reps.vote (vote_a);
rai::uint128_t rep_weight;
rai::uint128_t min_rep_weight;
{