From 4eefdccca2063b3d80a3ae5b8f1bf2546c4d93da Mon Sep 17 00:00:00 2001 From: clemahieu Date: Thu, 29 Jul 2021 00:54:41 +0100 Subject: [PATCH] Changing nano::wallets::network_params to a reference rather than initializing it statically. --- nano/node/wallet.cpp | 1 + nano/node/wallet.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/nano/node/wallet.cpp b/nano/node/wallet.cpp index 654d31123..5ee5f952e 100644 --- a/nano/node/wallet.cpp +++ b/nano/node/wallet.cpp @@ -1334,6 +1334,7 @@ void nano::wallets::do_wallet_actions () } nano::wallets::wallets (bool error_a, nano::node & node_a) : + network_params{ node_a.config.network_params }, observer ([] (bool) {}), kdf{ node_a.config.network_params.kdf_work }, node (node_a), diff --git a/nano/node/wallet.hpp b/nano/node/wallet.hpp index 25940a988..49e47669b 100644 --- a/nano/node/wallet.hpp +++ b/nano/node/wallet.hpp @@ -216,7 +216,7 @@ public: void split_if_needed (nano::transaction &, nano::store &); void move_table (std::string const &, MDB_txn *, MDB_txn *); std::unordered_map> get_wallets (); - nano::network_params network_params; + nano::network_params & network_params; std::function observer; std::unordered_map> items; std::multimap, std::function>, std::greater> actions;