Skip to content

Commit 4a00f97

Browse files
committed
Extract network_params and constants classes from common.hpp
Move ledger_constants, hardened_constants, node_constants, voting_constants, portmapping_constants, bootstrap_constants, network_params, and dev namespace into nano/secure/network_params.hpp/.cpp. common.hpp no longer includes constants.hpp, epochs.hpp, or keypair.hpp, making it significantly lighter. Files that need network_params or dev constants now include network_params.hpp directly. Add explicit chrono_literals and constants.hpp includes to headers that relied on transitive includes through common.hpp.
1 parent 413d715 commit 4a00f97

45 files changed

Lines changed: 454 additions & 386 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

nano/core_test/backend.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include <nano/lib/files.hpp>
22
#include <nano/lib/logging.hpp>
3+
#include <nano/secure/network_params.hpp>
34
#include <nano/store/backend.hpp>
45
#include <nano/store/db_val.hpp>
56
#include <nano/store/db_val_templ.hpp>

nano/core_test/block.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <nano/lib/work_version.hpp>
66
#include <nano/messages/messages.hpp>
77
#include <nano/node/endpoint.hpp>
8+
#include <nano/secure/network_params.hpp>
89
#include <nano/test_common/testutil.hpp>
910

1011
#include <gtest/gtest.h>

nano/core_test/difficulty.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <nano/lib/work.hpp>
77
#include <nano/lib/work_version.hpp>
88
#include <nano/secure/common.hpp>
9+
#include <nano/secure/network_params.hpp>
910
#include <nano/test_common/testutil.hpp>
1011

1112
#include <gtest/gtest.h>

nano/core_test/epochs.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include <nano/lib/epoch.hpp>
22
#include <nano/secure/common.hpp>
3+
#include <nano/secure/network_params.hpp>
34

45
#include <gtest/gtest.h>
56

nano/core_test/ledger_upgrades.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <nano/node/make_store.hpp>
99
#include <nano/secure/account_info.hpp>
1010
#include <nano/secure/common.hpp>
11+
#include <nano/secure/network_params.hpp>
1112
#include <nano/store/backend.hpp>
1213
#include <nano/store/db_val_templ.hpp>
1314
#include <nano/store/ledger/account.hpp>

nano/core_test/message.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <nano/lib/vote.hpp>
66
#include <nano/node/endpoint.hpp>
77
#include <nano/node/network.hpp>
8+
#include <nano/secure/network_params.hpp>
89
#include <nano/test_common/random.hpp>
910
#include <nano/test_common/testutil.hpp>
1011

nano/core_test/network_filter.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <nano/messages/messages.hpp>
66
#include <nano/node/endpoint.hpp>
77
#include <nano/secure/common.hpp>
8+
#include <nano/secure/network_params.hpp>
89
#include <nano/test_common/testutil.hpp>
910

1011
#include <gtest/gtest.h>

nano/core_test/numbers.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include <nano/lib/numbers.hpp>
33
#include <nano/lib/numbers_templ.hpp>
44
#include <nano/secure/common.hpp>
5+
#include <nano/secure/network_params.hpp>
56

67
#include <gtest/gtest.h>
78

nano/core_test/scheduler_buckets.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include <nano/lib/blockbuilders.hpp>
22
#include <nano/lib/blocks.hpp>
33
#include <nano/secure/common.hpp>
4+
#include <nano/secure/network_params.hpp>
45

56
#include <gtest/gtest.h>
67

nano/core_test/work_pool.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <nano/node/openclconfig.hpp>
1010
#include <nano/node/openclwork.hpp>
1111
#include <nano/secure/common.hpp>
12+
#include <nano/secure/network_params.hpp>
1213

1314
#include <gtest/gtest.h>
1415

0 commit comments

Comments
 (0)