Skip to content

Commit

Permalink
Merge branch 'develop' into repcrawler-overhaul-2
Browse files Browse the repository at this point in the history
# Conflicts:
#	nano/lib/stats_enums.hpp
#	nano/lib/thread_roles.cpp
#	nano/lib/thread_roles.hpp
  • Loading branch information
dsiganos committed Mar 8, 2024
2 parents 4f2f66b + 254aa88 commit 1f0fd2e
Show file tree
Hide file tree
Showing 131 changed files with 1,146 additions and 864 deletions.
6 changes: 3 additions & 3 deletions CL/cl2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3571,19 +3571,19 @@ cl::pointer<T, detail::Deleter<SVMAllocator<T, SVMTrait>>> allocate_svm(const cl
}
#endif // #if !defined(CL_HPP_NO_STD_UNIQUE_PTR)

/*! \brief Vector alias to simplify contruction of coarse-grained SVM containers.
/*! \brief Vector alias to simplify construction of coarse-grained SVM containers.
*
*/
template < class T >
using coarse_svm_vector = vector<T, cl::SVMAllocator<int, cl::SVMTraitCoarse<>>>;

/*! \brief Vector alias to simplify contruction of fine-grained SVM containers.
/*! \brief Vector alias to simplify construction of fine-grained SVM containers.
*
*/
template < class T >
using fine_svm_vector = vector<T, cl::SVMAllocator<int, cl::SVMTraitFine<>>>;

/*! \brief Vector alias to simplify contruction of fine-grained SVM containers that support platform atomics.
/*! \brief Vector alias to simplify construction of fine-grained SVM containers that support platform atomics.
*
*/
template < class T >
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif()

# OSX compatibility needs to be set before project is declared
set(CMAKE_OSX_DEPLOYMENT_TARGET
12
13.3
CACHE STRING "")

project(nano-node)
Expand Down
4 changes: 2 additions & 2 deletions boost_checkout_lite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ git submodule init boost
cd boost
# deactivate all boost submodules
git submodule foreach 'git config submodule.$sm_path.active false'
# selectivly activate required dependencies
# selectively activate required dependencies
for i in ${dependencies[@]}
do
git config submodule.$i.active true
done
cd ..
# Update all submodules recursivly. Deactivated modules will be skipped by --recursive
# Update all submodules recursively. Deactivated modules will be skipped by --recursive
git submodule update --jobs 16 --recursive --recommend-shallow --single-branch
1 change: 1 addition & 0 deletions nano/core_test/active_transactions.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <nano/lib/blocks.hpp>
#include <nano/lib/jsonconfig.hpp>
#include <nano/node/election.hpp>
#include <nano/node/scheduler/component.hpp>
Expand Down
1 change: 1 addition & 0 deletions nano/core_test/backlog.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <nano/lib/blocks.hpp>
#include <nano/node/active_transactions.hpp>
#include <nano/test_common/chains.hpp>
#include <nano/test_common/system.hpp>
Expand Down
1 change: 1 addition & 0 deletions nano/core_test/block.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <nano/lib/blocks.hpp>
#include <nano/lib/stream.hpp>
#include <nano/node/common.hpp>
#include <nano/test_common/testutil.hpp>
Expand Down
25 changes: 13 additions & 12 deletions nano/core_test/block_store.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <nano/crypto_lib/random_pool.hpp>
#include <nano/lib/blocks.hpp>
#include <nano/lib/lmdbconfig.hpp>
#include <nano/lib/logging.hpp>
#include <nano/lib/stats.hpp>
Expand Down Expand Up @@ -1126,29 +1127,29 @@ TEST (mdb_block_store, sideband_height)
.work (*pool.generate (key3.pub))
.build ();
ASSERT_EQ (nano::block_status::progress, ledger.process (transaction, open));
auto block1 (store.block.get (transaction, nano::dev::genesis->hash ()));
auto block1 = ledger.block (transaction, nano::dev::genesis->hash ());
ASSERT_EQ (block1->sideband ().height, 1);
auto block2 (store.block.get (transaction, send->hash ()));
auto block2 = ledger.block (transaction, send->hash ());
ASSERT_EQ (block2->sideband ().height, 2);
auto block3 (store.block.get (transaction, receive->hash ()));
auto block3 = ledger.block (transaction, receive->hash ());
ASSERT_EQ (block3->sideband ().height, 3);
auto block4 (store.block.get (transaction, change->hash ()));
auto block4 = ledger.block (transaction, change->hash ());
ASSERT_EQ (block4->sideband ().height, 4);
auto block5 (store.block.get (transaction, state_send1->hash ()));
auto block5 = ledger.block (transaction, state_send1->hash ());
ASSERT_EQ (block5->sideband ().height, 5);
auto block6 (store.block.get (transaction, state_send2->hash ()));
auto block6 = ledger.block (transaction, state_send2->hash ());
ASSERT_EQ (block6->sideband ().height, 6);
auto block7 (store.block.get (transaction, state_send3->hash ()));
auto block7 = ledger.block (transaction, state_send3->hash ());
ASSERT_EQ (block7->sideband ().height, 7);
auto block8 (store.block.get (transaction, state_open->hash ()));
auto block8 = ledger.block (transaction, state_open->hash ());
ASSERT_EQ (block8->sideband ().height, 1);
auto block9 (store.block.get (transaction, epoch->hash ()));
auto block9 = ledger.block (transaction, epoch->hash ());
ASSERT_EQ (block9->sideband ().height, 2);
auto block10 (store.block.get (transaction, epoch_open->hash ()));
auto block10 = ledger.block (transaction, epoch_open->hash ());
ASSERT_EQ (block10->sideband ().height, 1);
auto block11 (store.block.get (transaction, state_receive->hash ()));
auto block11 = ledger.block (transaction, state_receive->hash ());
ASSERT_EQ (block11->sideband ().height, 2);
auto block12 (store.block.get (transaction, open->hash ()));
auto block12 = ledger.block (transaction, open->hash ());
ASSERT_EQ (block12->sideband ().height, 1);
}

Expand Down
1 change: 1 addition & 0 deletions nano/core_test/blockprocessor.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <nano/lib/blockbuilders.hpp>
#include <nano/lib/blocks.hpp>
#include <nano/node/node.hpp>
#include <nano/node/nodeconfig.hpp>
#include <nano/secure/common.hpp>
Expand Down
11 changes: 6 additions & 5 deletions nano/core_test/bootstrap.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <nano/lib/blocks.hpp>
#include <nano/node/bootstrap/block_deserializer.hpp>
#include <nano/node/bootstrap/bootstrap_frontier.hpp>
#include <nano/node/bootstrap/bootstrap_lazy.hpp>
Expand Down Expand Up @@ -659,13 +660,13 @@ TEST (bootstrap_processor, push_diamond_pruning)
auto transaction (node1->store.tx_begin_write ());
ASSERT_EQ (1, node1->ledger.pruning_action (transaction, send1->hash (), 2));
ASSERT_EQ (1, node1->ledger.pruning_action (transaction, open->hash (), 1));
ASSERT_TRUE (node1->store.block.exists (transaction, nano::dev::genesis->hash ()));
ASSERT_FALSE (node1->store.block.exists (transaction, send1->hash ()));
ASSERT_TRUE (node1->ledger.block_exists (transaction, nano::dev::genesis->hash ()));
ASSERT_FALSE (node1->ledger.block_exists (transaction, send1->hash ()));
ASSERT_TRUE (node1->store.pruned.exists (transaction, send1->hash ()));
ASSERT_FALSE (node1->store.block.exists (transaction, open->hash ()));
ASSERT_FALSE (node1->ledger.block_exists (transaction, open->hash ()));
ASSERT_TRUE (node1->store.pruned.exists (transaction, open->hash ()));
ASSERT_TRUE (node1->store.block.exists (transaction, send2->hash ()));
ASSERT_TRUE (node1->store.block.exists (transaction, receive->hash ()));
ASSERT_TRUE (node1->ledger.block_exists (transaction, send2->hash ()));
ASSERT_TRUE (node1->ledger.block_exists (transaction, receive->hash ()));
ASSERT_EQ (2, node1->ledger.cache.pruned_count);
ASSERT_EQ (5, node1->ledger.cache.block_count);
}
Expand Down
1 change: 1 addition & 0 deletions nano/core_test/bootstrap_ascending.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <nano/lib/blocks.hpp>
#include <nano/lib/logging.hpp>
#include <nano/lib/stats.hpp>
#include <nano/lib/tomlconfig.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,3 +1,4 @@
#include <nano/lib/blocks.hpp>
#include <nano/test_common/chains.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
Expand Down
9 changes: 5 additions & 4 deletions nano/core_test/confirmation_height.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <nano/lib/blocks.hpp>
#include <nano/lib/logging.hpp>
#include <nano/node/election.hpp>
#include <nano/node/make_store.hpp>
Expand Down Expand Up @@ -1278,7 +1279,7 @@ TEST (confirmation_heightDeathTest, modified_chain)
ledger, write_database_queue, 10ms, logger, stopped, batch_write_size, [] (auto const &) {}, [] (auto const &) {}, [] () { return 0; });

{
// This reads the blocks in the account, but prevents any writes from occuring yet
// This reads the blocks in the account, but prevents any writes from occurring yet
auto scoped_write_guard = write_database_queue.wait (nano::writer::testing);
bounded_processor.process (send);
}
Expand All @@ -1297,7 +1298,7 @@ TEST (confirmation_heightDeathTest, modified_chain)
ledger, write_database_queue, 10ms, logger, stopped, batch_write_size, [] (auto const &) {}, [] (auto const &) {}, [] () { return 0; });

{
// This reads the blocks in the account, but prevents any writes from occuring yet
// This reads the blocks in the account, but prevents any writes from occurring yet
auto scoped_write_guard = write_database_queue.wait (nano::writer::testing);
unbounded_processor.process (send);
}
Expand Down Expand Up @@ -1366,7 +1367,7 @@ TEST (confirmation_heightDeathTest, modified_chain_account_removed)
ledger, write_database_queue, 10ms, logger, stopped, batch_write_size, [] (auto const &) {}, [] (auto const &) {}, [] () { return 0; });

{
// This reads the blocks in the account, but prevents any writes from occuring yet
// This reads the blocks in the account, but prevents any writes from occurring yet
auto scoped_write_guard = write_database_queue.wait (nano::writer::testing);
unbounded_processor.process (open);
}
Expand All @@ -1386,7 +1387,7 @@ TEST (confirmation_heightDeathTest, modified_chain_account_removed)
ledger, write_database_queue, 10ms, logger, stopped, batch_write_size, [] (auto const &) {}, [] (auto const &) {}, [] () { return 0; });

{
// This reads the blocks in the account, but prevents any writes from occuring yet
// This reads the blocks in the account, but prevents any writes from occurring yet
auto scoped_write_guard = write_database_queue.wait (nano::writer::testing);
bounded_processor.process (open);
}
Expand Down
1 change: 1 addition & 0 deletions nano/core_test/confirmation_solicitor.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <nano/lib/blocks.hpp>
#include <nano/lib/jsonconfig.hpp>
#include <nano/node/confirmation_solicitor.hpp>
#include <nano/node/transport/inproc.hpp>
Expand Down
2 changes: 1 addition & 1 deletion nano/core_test/conflicts.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#include <nano/lib/blocks.hpp>
#include <nano/node/election.hpp>
#include <nano/node/scheduler/component.hpp>
#include <nano/node/scheduler/priority.hpp>
Expand Down
1 change: 1 addition & 0 deletions nano/core_test/election.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <nano/lib/blocks.hpp>
#include <nano/node/election.hpp>
#include <nano/node/scheduler/component.hpp>
#include <nano/node/scheduler/priority.hpp>
Expand Down
1 change: 1 addition & 0 deletions nano/core_test/election_scheduler.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <nano/lib/blocks.hpp>
#include <nano/node/scheduler/component.hpp>
#include <nano/node/scheduler/priority.hpp>
#include <nano/test_common/system.hpp>
Expand Down
1 change: 1 addition & 0 deletions nano/core_test/frontiers_confirmation.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <nano/lib/blocks.hpp>
#include <nano/node/active_transactions.hpp>
#include <nano/test_common/system.hpp>
#include <nano/test_common/testutil.hpp>
Expand Down
Loading

0 comments on commit 1f0fd2e

Please sign in to comment.