Skip to content

Commit

Permalink
Merge pull request #4776 from clemahieu/compile_time_autumn2024
Browse files Browse the repository at this point in the history
Compile time autumn2024
  • Loading branch information
clemahieu authored Oct 31, 2024
2 parents 6fad597 + a7cfce1 commit 943f27d
Show file tree
Hide file tree
Showing 157 changed files with 944 additions and 706 deletions.
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

0 comments on commit 943f27d

Please sign in to comment.