Skip to content

Commit

Permalink
Merge branch 'nanocurrency:develop' into qt_state_open
Browse files Browse the repository at this point in the history
  • Loading branch information
SergiySW authored Oct 27, 2024
2 parents 28b9f4f + 47539ac commit 88659b5
Show file tree
Hide file tree
Showing 102 changed files with 2,048 additions and 1,651 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/code_sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- { name: ASAN, ignore_errors: false, leak_check: false }
- { name: ASAN_INT, ignore_errors: true, leak_check: false }
- { name: TSAN, ignore_errors: false }
- { name: LEAK, ignore_errors: true, leak_check: true }
- { name: LEAK, ignore_errors: false, leak_check: true }
exclude:
# Bug when running with TSAN: "ThreadSanitizer: CHECK failed: sanitizer_deadlock_detector"
- BACKEND: rocksdb
Expand Down
4 changes: 3 additions & 1 deletion nano/core_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ add_executable(
network_filter.cpp
network_functions.cpp
node.cpp
numbers.cpp
object_stream.cpp
optimistic_scheduler.cpp
processing_queue.cpp
processor_service.cpp
random_pool.cpp
rep_crawler.cpp
receivable.cpp
peer_history.cpp
Expand All @@ -51,10 +53,10 @@ add_executable(
socket.cpp
system.cpp
telemetry.cpp
thread_pool.cpp
throttle.cpp
toml.cpp
timer.cpp
uint256_union.cpp
unchecked_map.cpp
utility.cpp
vote_cache.cpp
Expand Down
10 changes: 5 additions & 5 deletions nano/core_test/block_store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ TEST (block_store, large_iteration)
// Reverse iteration
std::unordered_set<nano::account> accounts3;
previous = std::numeric_limits<nano::uint256_t>::max ();
for (auto i (store->account.rbegin (transaction)), n (store->account.end (transaction)); i != n; --i)
for (auto i (store->account.rbegin (transaction)), n (store->account.rend (transaction)); i != n; ++i)
{
nano::account current (i->first);
ASSERT_LT (current.number (), previous.number ());
Expand Down Expand Up @@ -1254,7 +1254,7 @@ TEST (block_store, online_weight)
auto transaction (store->tx_begin_write ());
ASSERT_EQ (0, store->online_weight.count (transaction));
ASSERT_EQ (store->online_weight.end (transaction), store->online_weight.begin (transaction));
ASSERT_EQ (store->online_weight.end (transaction), store->online_weight.rbegin (transaction));
ASSERT_EQ (store->online_weight.rend (transaction), store->online_weight.rbegin (transaction));
store->online_weight.put (transaction, 1, 2);
store->online_weight.put (transaction, 3, 4);
}
Expand All @@ -1266,18 +1266,18 @@ TEST (block_store, online_weight)
ASSERT_EQ (1, item->first);
ASSERT_EQ (2, item->second.number ());
auto item_last (store->online_weight.rbegin (transaction));
ASSERT_NE (store->online_weight.end (transaction), item_last);
ASSERT_NE (store->online_weight.rend (transaction), item_last);
ASSERT_EQ (3, item_last->first);
ASSERT_EQ (4, item_last->second.number ());
store->online_weight.del (transaction, 1);
ASSERT_EQ (1, store->online_weight.count (transaction));
ASSERT_EQ (store->online_weight.begin (transaction), store->online_weight.rbegin (transaction));
ASSERT_EQ (*store->online_weight.begin (transaction), *store->online_weight.rbegin (transaction));
store->online_weight.del (transaction, 3);
}
auto transaction (store->tx_begin_read ());
ASSERT_EQ (0, store->online_weight.count (transaction));
ASSERT_EQ (store->online_weight.end (transaction), store->online_weight.begin (transaction));
ASSERT_EQ (store->online_weight.end (transaction), store->online_weight.rbegin (transaction));
ASSERT_EQ (store->online_weight.rend (transaction), store->online_weight.rbegin (transaction));
}

TEST (block_store, pruned_blocks)
Expand Down
2 changes: 1 addition & 1 deletion nano/core_test/ledger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2406,7 +2406,7 @@ TEST (ledger, state_account)
.work (*pool.generate (nano::dev::genesis->hash ()))
.build ();
ASSERT_EQ (nano::block_status::progress, ledger.process (transaction, send1));
ASSERT_EQ (nano::dev::genesis_key.pub, ledger.any.block_account (transaction, send1->hash ()));
ASSERT_EQ (nano::dev::genesis_key.pub, ledger.any.block_account (transaction, send1->hash ()).value ());
}

TEST (ledger, state_send_receive)
Expand Down
Loading

0 comments on commit 88659b5

Please sign in to comment.