diff --git a/nano/node/node.cpp b/nano/node/node.cpp index 2df9363db9..35b4874ae4 100644 --- a/nano/node/node.cpp +++ b/nano/node/node.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -178,7 +179,8 @@ nano::node::node (std::shared_ptr io_ctx_a, std::filesy active{ *active_impl }, rep_crawler (config.rep_crawler, *this), rep_tiers{ ledger, network_params, online_reps, stats, logger }, - vote_processor{ config.vote_processor, active, observers, stats, flags, logger, online_reps, rep_crawler, ledger, network_params, rep_tiers }, + vote_processor_impl{ std::make_unique (config.vote_processor, active, observers, stats, flags, logger, online_reps, rep_crawler, ledger, network_params, rep_tiers) }, + vote_processor{ *vote_processor_impl }, warmed_up (0), online_reps (ledger, config), history_impl{ std::make_unique (config.network_params.voting) }, diff --git a/nano/node/node.hpp b/nano/node/node.hpp index 53ba1f69a9..354ee8d114 100644 --- a/nano/node/node.hpp +++ b/nano/node/node.hpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -48,6 +47,7 @@ namespace nano class active_transactions; class confirming_set; class node; +class vote_processor; class work_pool; namespace scheduler @@ -175,7 +175,8 @@ class node final : public std::enable_shared_from_this nano::online_reps online_reps; nano::rep_crawler rep_crawler; nano::rep_tiers rep_tiers; - nano::vote_processor vote_processor; + std::unique_ptr vote_processor_impl; + nano::vote_processor & vote_processor; unsigned warmed_up; std::unique_ptr history_impl; nano::local_vote_history & history;