Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile time autumn2024 #4776

Merged
merged 25 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
6a8b32a
Directly use nano::write for serializing block_type since it's just o…
clemahieu Oct 27, 2024
dd50739
Forward declare block_type.
clemahieu Oct 27, 2024
e11ecb7
Extracting epochs class to its own file and reducing epoch.hpp
clemahieu Oct 27, 2024
4d86e5f
Using standard threads rather than boost threads and using default st…
clemahieu Oct 27, 2024
56da1b2
Move singleton memory pool class to memory.hpp and reducing headers.
clemahieu Oct 27, 2024
aecf074
Forward declare endpoint in lib/common.hpp
clemahieu Oct 27, 2024
8f0b2c5
Forward declare jsonconfig in messages.hpp
clemahieu Oct 27, 2024
8dad87f
Move block_details and block_sideband implementations to its own file.
clemahieu Oct 27, 2024
fc36f08
Forward declare hash specialisations and move implementations to numb…
clemahieu Oct 27, 2024
619a7f7
Create stream_fwd.hpp header for stream forward declarations.
clemahieu Oct 27, 2024
d54e3d9
Rename nano/common.hpp to nano/endpoint.hpp and extract endpoint_temp…
clemahieu Oct 27, 2024
b4eb765
Forward declare work_version and extract to its own file.
clemahieu Oct 27, 2024
7dce2d7
Forward declare block_uniquer
clemahieu Oct 28, 2024
7e6c41a
Forward declaring block_uniquer.
clemahieu Oct 28, 2024
dc69e54
Removing unused channel header.
clemahieu Oct 28, 2024
d09940f
Remove inclusion of vote in common.hpp header.
clemahieu Oct 28, 2024
342801b
Remove unused inclusion of utility.hpp
clemahieu Oct 28, 2024
fed751c
Forward declaring stats.
clemahieu Oct 28, 2024
a23deff
Forward declare nano::transport::fake::channel
clemahieu Oct 28, 2024
31a9e7b
Add missing deque include.
clemahieu Oct 28, 2024
de9b40b
Removing include of rep_weights from common.hpp
clemahieu Oct 28, 2024
909cdfc
Suppress iterator warning on windows.
clemahieu Oct 29, 2024
70afe41
Include missing optional header.
clemahieu Oct 29, 2024
a57f5d0
Add existing fwd files to cmake project.
clemahieu Oct 30, 2024
a7cfce1
Move a number of forward declarations in to the fwd.hpp files.
clemahieu Oct 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ endif()

if(MSVC)
add_definitions(/MP)
add_definitions(
-D_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING) # Suppress iterator warning
endif()

set(CPACK_PACKAGE_VENDOR "Nano Currency")
Expand Down
2 changes: 2 additions & 0 deletions nano/core_test/active_elections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
#include <nano/node/scheduler/component.hpp>
#include <nano/node/scheduler/manual.hpp>
#include <nano/node/scheduler/priority.hpp>
#include <nano/node/transport/fake.hpp>
#include <nano/node/transport/inproc.hpp>
#include <nano/node/vote_router.hpp>
#include <nano/secure/ledger.hpp>
#include <nano/secure/ledger_set_any.hpp>
#include <nano/secure/ledger_set_confirmed.hpp>
#include <nano/secure/vote.hpp>
#include <nano/test_common/chains.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
Expand Down
5 changes: 4 additions & 1 deletion nano/core_test/block.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#include <nano/lib/block_uniquer.hpp>
#include <nano/lib/blocks.hpp>
#include <nano/lib/stream.hpp>
#include <nano/node/common.hpp>
#include <nano/lib/work_version.hpp>
#include <nano/node/endpoint.hpp>
#include <nano/node/messages.hpp>
#include <nano/test_common/testutil.hpp>

#include <gtest/gtest.h>
Expand Down
3 changes: 2 additions & 1 deletion nano/core_test/block_store.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#include <nano/crypto_lib/random_pool.hpp>
#include <nano/lib/block_type.hpp>
#include <nano/lib/blocks.hpp>
#include <nano/lib/lmdbconfig.hpp>
#include <nano/lib/logging.hpp>
#include <nano/lib/stats.hpp>
#include <nano/lib/utility.hpp>
#include <nano/lib/work.hpp>
#include <nano/node/common.hpp>
#include <nano/node/endpoint.hpp>
#include <nano/node/make_store.hpp>
#include <nano/secure/common.hpp>
#include <nano/secure/ledger.hpp>
Expand Down
1 change: 1 addition & 0 deletions nano/core_test/bootstrap_server.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <nano/lib/blocks.hpp>
#include <nano/node/transport/fake.hpp>
#include <nano/test_common/chains.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
Expand Down
1 change: 1 addition & 0 deletions nano/core_test/conflicts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <nano/node/scheduler/component.hpp>
#include <nano/node/scheduler/priority.hpp>
#include <nano/secure/ledger.hpp>
#include <nano/secure/vote.hpp>
#include <nano/test_common/chains.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
Expand Down
2 changes: 2 additions & 0 deletions nano/core_test/difficulty.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#include <nano/lib/block_type.hpp>
#include <nano/lib/blocks.hpp>
#include <nano/lib/config.hpp>
#include <nano/lib/epoch.hpp>
#include <nano/lib/numbers.hpp>
#include <nano/lib/work.hpp>
#include <nano/lib/work_version.hpp>
#include <nano/secure/common.hpp>
#include <nano/test_common/testutil.hpp>

Expand Down
1 change: 1 addition & 0 deletions nano/core_test/distributed_work.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <nano/core_test/fakes/work_peer.hpp>
#include <nano/lib/work_version.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>

Expand Down
2 changes: 1 addition & 1 deletion nano/core_test/entry.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <nano/lib/logging.hpp>
#include <nano/node/common.hpp>
#include <nano/lib/memory.hpp>
#include <nano/secure/utility.hpp>

#include <gtest/gtest.h>
Expand Down
1 change: 1 addition & 0 deletions nano/core_test/fair_queue.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <nano/node/fair_queue.hpp>
#include <nano/node/transport/fake.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>

Expand Down
3 changes: 2 additions & 1 deletion nano/core_test/fakes/work_peer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
#include <nano/lib/locks.hpp>
#include <nano/lib/numbers.hpp>
#include <nano/lib/work.hpp>
#include <nano/node/common.hpp>
#include <nano/lib/work_version.hpp>
#include <nano/node/endpoint.hpp>

#include <boost/asio.hpp>
#include <boost/asio/steady_timer.hpp>
Expand Down
1 change: 1 addition & 0 deletions nano/core_test/ledger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <nano/node/vote_router.hpp>
#include <nano/secure/ledger_set_any.hpp>
#include <nano/secure/ledger_set_confirmed.hpp>
#include <nano/secure/vote.hpp>
#include <nano/store/rocksdb/rocksdb.hpp>
#include <nano/test_common/ledger_context.hpp>
#include <nano/test_common/make_store.hpp>
Expand Down
1 change: 1 addition & 0 deletions nano/core_test/memory_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <nano/lib/memory.hpp>
#include <nano/node/active_elections.hpp>
#include <nano/secure/common.hpp>
#include <nano/secure/vote.hpp>

#include <gtest/gtest.h>

Expand Down
3 changes: 2 additions & 1 deletion nano/core_test/message.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#include <nano/crypto_lib/random_pool.hpp>
#include <nano/lib/blocks.hpp>
#include <nano/lib/stream.hpp>
#include <nano/node/common.hpp>
#include <nano/node/endpoint.hpp>
#include <nano/node/network.hpp>
#include <nano/secure/vote.hpp>
#include <nano/test_common/testutil.hpp>

#include <gtest/gtest.h>
Expand Down
1 change: 1 addition & 0 deletions nano/core_test/message_deserializer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <nano/lib/blocks.hpp>
#include <nano/node/transport/message_deserializer.hpp>
#include <nano/secure/vote.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>

Expand Down
1 change: 1 addition & 0 deletions nano/core_test/network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <nano/node/nodeconfig.hpp>
#include <nano/node/scheduler/component.hpp>
#include <nano/node/scheduler/priority.hpp>
#include <nano/node/transport/fake.hpp>
#include <nano/node/transport/inproc.hpp>
#include <nano/node/transport/tcp_listener.hpp>
#include <nano/node/transport/tcp_socket.hpp>
Expand Down
5 changes: 3 additions & 2 deletions nano/core_test/network_filter.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#include <nano/lib/blocks.hpp>
#include <nano/lib/network_filter.hpp>
#include <nano/lib/stream.hpp>
#include <nano/node/common.hpp>
#include <nano/node/endpoint.hpp>
#include <nano/node/messages.hpp>
#include <nano/secure/common.hpp>
#include <nano/test_common/testutil.hpp>

Expand Down Expand Up @@ -163,4 +164,4 @@ TEST (network_filter, expire)

ASSERT_FALSE (filter.check (2)); // Entry with epoch 1 should be expired
ASSERT_FALSE (filter.apply (2)); // Entry with epoch 1 should be replaced
}
}
4 changes: 3 additions & 1 deletion nano/core_test/node.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <nano/lib/blocks.hpp>
#include <nano/lib/config.hpp>
#include <nano/lib/logging.hpp>
#include <nano/lib/work_version.hpp>
#include <nano/node/active_elections.hpp>
#include <nano/node/confirming_set.hpp>
#include <nano/node/election.hpp>
Expand All @@ -19,6 +20,7 @@
#include <nano/secure/ledger.hpp>
#include <nano/secure/ledger_set_any.hpp>
#include <nano/secure/ledger_set_confirmed.hpp>
#include <nano/secure/vote.hpp>
#include <nano/test_common/network.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
Expand Down Expand Up @@ -3814,4 +3816,4 @@ TEST (node, container_info)
// This should just execute, sanitizers will catch any problems
ASSERT_NO_THROW (node1.container_info ());
ASSERT_NO_THROW (node2.container_info ());
}
}
3 changes: 2 additions & 1 deletion nano/core_test/numbers.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <nano/lib/numbers.hpp>
#include <nano/lib/numbers_templ.hpp>
#include <nano/secure/common.hpp>

#include <gtest/gtest.h>
Expand Down Expand Up @@ -647,4 +648,4 @@ TEST (uint512_union, hash)
ASSERT_NE (h (x1), h (x2));
}
}
}
}
3 changes: 2 additions & 1 deletion nano/core_test/rep_crawler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <nano/node/transport/fake.hpp>
#include <nano/node/transport/inproc.hpp>
#include <nano/secure/ledger.hpp>
#include <nano/secure/vote.hpp>
#include <nano/test_common/chains.hpp>
#include <nano/test_common/network.hpp>
#include <nano/test_common/system.hpp>
Expand Down Expand Up @@ -327,4 +328,4 @@ TEST (rep_crawler, ignore_rebroadcasted)
};

ASSERT_NEVER (1s, tick () || node1.rep_crawler.representative_count () > 0);
}
}
1 change: 1 addition & 0 deletions nano/core_test/request_aggregator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <nano/node/election.hpp>
#include <nano/node/local_vote_history.hpp>
#include <nano/node/request_aggregator.hpp>
#include <nano/node/transport/fake.hpp>
#include <nano/node/transport/inproc.hpp>
#include <nano/secure/ledger.hpp>
#include <nano/secure/ledger_set_confirmed.hpp>
Expand Down
1 change: 1 addition & 0 deletions nano/core_test/system.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <nano/lib/blocks.hpp>
#include <nano/lib/thread_runner.hpp>
#include <nano/lib/work_version.hpp>
#include <nano/node/transport/inproc.hpp>
#include <nano/secure/ledger.hpp>
#include <nano/secure/ledger_set_any.hpp>
Expand Down
1 change: 1 addition & 0 deletions nano/core_test/telemetry.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <nano/node/telemetry.hpp>
#include <nano/node/transport/fake.hpp>
#include <nano/test_common/network.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/telemetry.hpp>
Expand Down
2 changes: 2 additions & 0 deletions nano/core_test/vote_processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
#include <nano/lib/jsonconfig.hpp>
#include <nano/node/active_elections.hpp>
#include <nano/node/election.hpp>
#include <nano/node/transport/fake.hpp>
#include <nano/node/transport/inproc.hpp>
#include <nano/node/vote_processor.hpp>
#include <nano/node/vote_router.hpp>
#include <nano/secure/ledger.hpp>
#include <nano/secure/vote.hpp>
#include <nano/test_common/chains.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
Expand Down
3 changes: 2 additions & 1 deletion nano/core_test/voting.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#include <nano/lib/blocks.hpp>
#include <nano/node/common.hpp>
#include <nano/node/endpoint.hpp>
#include <nano/node/local_vote_history.hpp>
#include <nano/node/vote_generator.hpp>
#include <nano/node/vote_spacing.hpp>
#include <nano/secure/ledger.hpp>
#include <nano/secure/vote.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>

Expand Down
1 change: 1 addition & 0 deletions nano/core_test/wallet.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <nano/crypto_lib/random_pool.hpp>
#include <nano/lib/blocks.hpp>
#include <nano/lib/thread_runner.hpp>
#include <nano/lib/work_version.hpp>
#include <nano/node/active_elections.hpp>
#include <nano/node/election.hpp>
#include <nano/secure/ledger.hpp>
Expand Down
2 changes: 2 additions & 0 deletions nano/core_test/websocket.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include <nano/core_test/fakes/websocket_client.hpp>
#include <nano/lib/blocks.hpp>
#include <nano/lib/jsonconfig.hpp>
#include <nano/lib/work_version.hpp>
#include <nano/node/active_elections.hpp>
#include <nano/node/telemetry.hpp>
#include <nano/node/transport/fake.hpp>
Expand Down
1 change: 1 addition & 0 deletions nano/core_test/work_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <nano/lib/logging.hpp>
#include <nano/lib/timer.hpp>
#include <nano/lib/work.hpp>
#include <nano/lib/work_version.hpp>
#include <nano/node/openclconfig.hpp>
#include <nano/node/openclwork.hpp>
#include <nano/secure/common.hpp>
Expand Down
8 changes: 7 additions & 1 deletion nano/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ add_library(
char_traits.hpp
cli.hpp
cli.cpp
common.hpp
config.hpp
config.cpp
configbase.hpp
Expand All @@ -44,8 +45,11 @@ add_library(
env.cpp
epoch.hpp
epoch.cpp
epochs.cpp
epochs.hpp
errors.hpp
errors.cpp
fwd.hpp
id_dispenser.hpp
interval.hpp
ipc.hpp
Expand All @@ -69,6 +73,7 @@ add_library(
network_filter.cpp
numbers.hpp
numbers.cpp
numbers_templ.hpp
object_stream.hpp
object_stream.cpp
object_stream_adapters.hpp
Expand Down Expand Up @@ -110,7 +115,8 @@ add_library(
walletconfig.hpp
walletconfig.cpp
work.hpp
work.cpp)
work.cpp
work_version.hpp)

include_directories(${CMAKE_SOURCE_DIR}/submodules)
include_directories(
Expand Down
Loading
Loading