Skip to content

Commit

Permalink
Fix active_transactions/signature checker initialization order (nanoc…
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptocode authored and Guilherme Lawless committed Apr 15, 2019
1 parent 939cc59 commit 5ef0485
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions nano/node/node.cpp
Expand Up @@ -1027,14 +1027,13 @@ wallets_store_impl (std::make_unique<nano::mdb_wallets_store> (init_a.wallets_st
wallets_store (*wallets_store_impl),
gap_cache (*this),
ledger (store, stats, config.epoch_block_link, config.epoch_block_signer),
active (*this),
checker (config.signature_checker_threads),
network (*this, config.peering_port),
bootstrap_initiator (*this),
bootstrap (io_ctx_a, config.peering_port, *this),
application_path (application_path_a),
wallets (init_a.wallet_init, *this),
port_mapping (*this),
checker (config.signature_checker_threads),
vote_processor (*this),
rep_crawler (*this),
warmed_up (0),
Expand All @@ -1046,6 +1045,7 @@ block_processor_thread ([this]() {
online_reps (*this, config.online_weight_minimum.number ()),
stats (config.stat_config),
vote_uniquer (block_uniquer),
active (*this),
startup_time (std::chrono::steady_clock::now ())
{
wallets.observer = [this](bool active) {
Expand Down
4 changes: 2 additions & 2 deletions nano/node/node.hpp
Expand Up @@ -488,15 +488,14 @@ class node : public std::enable_shared_from_this<nano::node>
nano::wallets_store & wallets_store;
nano::gap_cache gap_cache;
nano::ledger ledger;
nano::active_transactions active;
nano::signature_checker checker;
nano::network network;
nano::bootstrap_initiator bootstrap_initiator;
nano::bootstrap_listener bootstrap;
boost::filesystem::path application_path;
nano::node_observers observers;
nano::wallets wallets;
nano::port_mapping port_mapping;
nano::signature_checker checker;
nano::vote_processor vote_processor;
nano::rep_crawler rep_crawler;
unsigned warmed_up;
Expand All @@ -509,6 +508,7 @@ class node : public std::enable_shared_from_this<nano::node>
nano::keypair node_id;
nano::block_uniquer block_uniquer;
nano::vote_uniquer vote_uniquer;
nano::active_transactions active;
const std::chrono::steady_clock::time_point startup_time;
std::chrono::seconds unchecked_cutoff = std::chrono::seconds (7 * 24 * 60 * 60); // Week
static double constexpr price_max = 16.0;
Expand Down

0 comments on commit 5ef0485

Please sign in to comment.