diff --git a/nano/core_test/active_transactions.cpp b/nano/core_test/active_transactions.cpp index e40e8170..ed9fef2d 100644 --- a/nano/core_test/active_transactions.cpp +++ b/nano/core_test/active_transactions.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/nano/core_test/bootstrap.cpp b/nano/core_test/bootstrap.cpp index 34617b1d..b78b65d5 100644 --- a/nano/core_test/bootstrap.cpp +++ b/nano/core_test/bootstrap.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include diff --git a/nano/core_test/confirmation_height.cpp b/nano/core_test/confirmation_height.cpp index 352d04d4..b35eadc7 100644 --- a/nano/core_test/confirmation_height.cpp +++ b/nano/core_test/confirmation_height.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/nano/core_test/confirmation_solicitor.cpp b/nano/core_test/confirmation_solicitor.cpp index a35ff989..20e2ee5a 100644 --- a/nano/core_test/confirmation_solicitor.cpp +++ b/nano/core_test/confirmation_solicitor.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/nano/core_test/conflicts.cpp b/nano/core_test/conflicts.cpp index 943bb756..32315404 100644 --- a/nano/core_test/conflicts.cpp +++ b/nano/core_test/conflicts.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include diff --git a/nano/core_test/election.cpp b/nano/core_test/election.cpp index 766b41c0..c46731aa 100644 --- a/nano/core_test/election.cpp +++ b/nano/core_test/election.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include diff --git a/nano/core_test/election_scheduler.cpp b/nano/core_test/election_scheduler.cpp index 92afc9b2..48ccac76 100644 --- a/nano/core_test/election_scheduler.cpp +++ b/nano/core_test/election_scheduler.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include diff --git a/nano/core_test/ledger.cpp b/nano/core_test/ledger.cpp index 773057e8..3ee507cb 100644 --- a/nano/core_test/ledger.cpp +++ b/nano/core_test/ledger.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include diff --git a/nano/core_test/node.cpp b/nano/core_test/node.cpp index 48fd15a0..77029005 100644 --- a/nano/core_test/node.cpp +++ b/nano/core_test/node.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include diff --git a/nano/core_test/optimistic_scheduler.cpp b/nano/core_test/optimistic_scheduler.cpp index 789eb66b..1fc1deac 100644 --- a/nano/core_test/optimistic_scheduler.cpp +++ b/nano/core_test/optimistic_scheduler.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include diff --git a/nano/core_test/rep_crawler.cpp b/nano/core_test/rep_crawler.cpp index 6e78d3a6..0dc098ad 100644 --- a/nano/core_test/rep_crawler.cpp +++ b/nano/core_test/rep_crawler.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include diff --git a/nano/core_test/request_aggregator.cpp b/nano/core_test/request_aggregator.cpp index 3bb865f9..9860075c 100644 --- a/nano/core_test/request_aggregator.cpp +++ b/nano/core_test/request_aggregator.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/nano/core_test/vote_processor.cpp b/nano/core_test/vote_processor.cpp index 6e271568..2af6b1e9 100644 --- a/nano/core_test/vote_processor.cpp +++ b/nano/core_test/vote_processor.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/nano/core_test/wallet.cpp b/nano/core_test/wallet.cpp index 358ee2d2..ef40fe8c 100644 --- a/nano/core_test/wallet.cpp +++ b/nano/core_test/wallet.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include diff --git a/nano/core_test/wallets.cpp b/nano/core_test/wallets.cpp index 48c0e79d..fd5c5431 100644 --- a/nano/core_test/wallets.cpp +++ b/nano/core_test/wallets.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include diff --git a/nano/core_test/websocket.cpp b/nano/core_test/websocket.cpp index 0d147dba..8d90ef3e 100644 --- a/nano/core_test/websocket.cpp +++ b/nano/core_test/websocket.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/nano/nano_node/entry.cpp b/nano/nano_node/entry.cpp index fa4534e6..0d2898ab 100644 --- a/nano/nano_node/entry.cpp +++ b/nano/nano_node/entry.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include diff --git a/nano/node/blockprocessor.cpp b/nano/node/blockprocessor.cpp index a63206ca..564b6dd3 100644 --- a/nano/node/blockprocessor.cpp +++ b/nano/node/blockprocessor.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include diff --git a/nano/node/election.cpp b/nano/node/election.cpp index 865593ab..3b2b5be4 100644 --- a/nano/node/election.cpp +++ b/nano/node/election.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include diff --git a/nano/node/json_handler.cpp b/nano/node/json_handler.cpp index 1d98e73c..1ba7f100 100644 --- a/nano/node/json_handler.cpp +++ b/nano/node/json_handler.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include diff --git a/nano/node/node.cpp b/nano/node/node.cpp index 57e52b3d..95916058 100644 --- a/nano/node/node.cpp +++ b/nano/node/node.cpp @@ -2,8 +2,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -167,22 +169,23 @@ nano::node::node (std::shared_ptr io_ctx_a, std::filesy tcp_listener{ std::make_shared (network.port, *this, config.tcp_incoming_connections_max) }, application_path (application_path_a), port_mapping (*this), + block_processor (*this, write_database_queue), + confirmation_height_processor (ledger, write_database_queue, config.conf_height_processor_batch_min_time, logger, node_initialized_latch, flags.confirmation_height_processor_mode), + active_impl{ std::make_unique (*this, confirmation_height_processor, block_processor) }, + active{ *active_impl }, rep_crawler (config.rep_crawler, *this), rep_tiers{ ledger, network_params, online_reps, stats, logger }, vote_processor{ active, observers, stats, config, flags, logger, online_reps, rep_crawler, ledger, network_params, rep_tiers }, warmed_up (0), - block_processor (*this, write_database_queue), online_reps (ledger, config), history_impl{ std::make_unique (config.network_params.voting) }, history{ *history_impl }, vote_uniquer{}, - confirmation_height_processor (ledger, write_database_queue, config.conf_height_processor_batch_min_time, logger, node_initialized_latch, flags.confirmation_height_processor_mode), vote_cache{ config.vote_cache, stats }, generator_impl{ std::make_unique (config, *this, ledger, wallets, vote_processor, history, network, stats, logger, /* non-final */ false) }, generator{ *generator_impl }, final_generator_impl{ std::make_unique (config, *this, ledger, wallets, vote_processor, history, network, stats, logger, /* final */ true) }, final_generator{ *final_generator_impl }, - active{ *this, confirmation_height_processor, block_processor }, scheduler_impl{ std::make_unique (*this) }, scheduler{ *scheduler_impl }, aggregator (config, stats, generator, final_generator, history, ledger, wallets, active), diff --git a/nano/node/node.hpp b/nano/node/node.hpp index 6d807463..7bace7a7 100644 --- a/nano/node/node.hpp +++ b/nano/node/node.hpp @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include @@ -47,6 +46,7 @@ namespace nano { +class active_transactions; namespace rocksdb { } // Declare a namespace rocksdb inside nano so all references to the rocksdb library need to be globally scoped e.g. ::rocksdb::Slice @@ -160,23 +160,24 @@ public: std::filesystem::path application_path; nano::node_observers observers; nano::port_mapping port_mapping; + nano::block_processor block_processor; + nano::confirmation_height_processor confirmation_height_processor; + std::unique_ptr active_impl; + nano::active_transactions & active; nano::online_reps online_reps; nano::rep_crawler rep_crawler; nano::rep_tiers rep_tiers; nano::vote_processor vote_processor; unsigned warmed_up; - nano::block_processor block_processor; std::unique_ptr history_impl; nano::local_vote_history & history; nano::block_uniquer block_uniquer; nano::vote_uniquer vote_uniquer; - nano::confirmation_height_processor confirmation_height_processor; nano::vote_cache vote_cache; std::unique_ptr generator_impl; nano::vote_generator & generator; std::unique_ptr final_generator_impl; nano::vote_generator & final_generator; - nano::active_transactions active; private: // Placed here to maintain initialization order std::unique_ptr scheduler_impl; diff --git a/nano/node/node_observers.hpp b/nano/node/node_observers.hpp index d1b074f2..9a97987c 100644 --- a/nano/node/node_observers.hpp +++ b/nano/node/node_observers.hpp @@ -2,8 +2,8 @@ #include #include -#include #include +#include namespace nano { diff --git a/nano/node/repcrawler.cpp b/nano/node/repcrawler.cpp index adf2fd2f..42f6d210 100644 --- a/nano/node/repcrawler.cpp +++ b/nano/node/repcrawler.cpp @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/nano/node/scheduler/hinted.cpp b/nano/node/scheduler/hinted.cpp index 33e008fa..a6f97686 100644 --- a/nano/node/scheduler/hinted.cpp +++ b/nano/node/scheduler/hinted.cpp @@ -1,5 +1,7 @@ #include #include +#include +#include #include #include #include diff --git a/nano/node/scheduler/manual.cpp b/nano/node/scheduler/manual.cpp index f84774bc..3bcc83c1 100644 --- a/nano/node/scheduler/manual.cpp +++ b/nano/node/scheduler/manual.cpp @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/nano/node/scheduler/manual.hpp b/nano/node/scheduler/manual.hpp index f29f42d2..947c2fe4 100644 --- a/nano/node/scheduler/manual.hpp +++ b/nano/node/scheduler/manual.hpp @@ -1,7 +1,7 @@ #pragma once #include #include -#include +#include #include diff --git a/nano/node/scheduler/optimistic.cpp b/nano/node/scheduler/optimistic.cpp index 2c142516..a11e1540 100644 --- a/nano/node/scheduler/optimistic.cpp +++ b/nano/node/scheduler/optimistic.cpp @@ -1,6 +1,8 @@ #include #include #include +#include +#include #include #include #include diff --git a/nano/node/scheduler/priority.cpp b/nano/node/scheduler/priority.cpp index b37276e0..c6eb0d99 100644 --- a/nano/node/scheduler/priority.cpp +++ b/nano/node/scheduler/priority.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include diff --git a/nano/node/scheduler/priority.hpp b/nano/node/scheduler/priority.hpp index d8a7b2da..69320021 100644 --- a/nano/node/scheduler/priority.hpp +++ b/nano/node/scheduler/priority.hpp @@ -1,7 +1,6 @@ #pragma once #include -#include #include @@ -16,6 +15,7 @@ namespace nano class block; class container_info_component; class node; +class stats; } namespace nano::store { diff --git a/nano/node/websocket.cpp b/nano/node/websocket.cpp index 68f870a3..1cebbf75 100644 --- a/nano/node/websocket.cpp +++ b/nano/node/websocket.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/nano/qt/qt.cpp b/nano/qt/qt.cpp index 744cf095..d33db65c 100644 --- a/nano/qt/qt.cpp +++ b/nano/qt/qt.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/nano/rpc_test/rpc.cpp b/nano/rpc_test/rpc.cpp index 5d5e4190..32a32481 100644 --- a/nano/rpc_test/rpc.cpp +++ b/nano/rpc_test/rpc.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include diff --git a/nano/slow_test/node.cpp b/nano/slow_test/node.cpp index 06b8728e..73a9ebe3 100644 --- a/nano/slow_test/node.cpp +++ b/nano/slow_test/node.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include diff --git a/nano/slow_test/vote_cache.cpp b/nano/slow_test/vote_cache.cpp index 1e0b4aba..73ecba40 100644 --- a/nano/slow_test/vote_cache.cpp +++ b/nano/slow_test/vote_cache.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include diff --git a/nano/test_common/system.cpp b/nano/test_common/system.cpp index 379d0ec7..914d472e 100644 --- a/nano/test_common/system.cpp +++ b/nano/test_common/system.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/nano/test_common/testutil.cpp b/nano/test_common/testutil.cpp index 114a7813..c7b126f2 100644 --- a/nano/test_common/testutil.cpp +++ b/nano/test_common/testutil.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include