From d451d75ef3e885e411e0a8fc843570eec61aaf7e Mon Sep 17 00:00:00 2001 From: cryptocode Date: Fri, 20 Jul 2018 11:12:56 +0200 Subject: [PATCH] Remove unnecessary observer subscriptions to reduce a bit of locking overhead --- rai/node/node.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/rai/node/node.cpp b/rai/node/node.cpp index 3ff911ab61..c51ba37239 100644 --- a/rai/node/node.cpp +++ b/rai/node/node.cpp @@ -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 vote_a, rai::endpoint const &) { + observers.vote.add ([this](std::shared_ptr vote_a, rai::endpoint const & endpoint_a) { this->gap_cache.vote (vote_a); - }); - observers.vote.add ([this](std::shared_ptr vote_a, rai::endpoint const &) { this->online_reps.vote (vote_a); - }); - observers.vote.add ([this](std::shared_ptr vote_a, rai::endpoint const & endpoint_a) { rai::uint128_t rep_weight; rai::uint128_t min_rep_weight; {