Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions nano/core_test/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ TEST (node, fork_open_flip)

// ensure open2 is in node2 ledger (and therefore has sideband) and manually trigger an election for open2
ASSERT_TIMELY (5s, node2.block (open2->hash ()) != nullptr);
node2.scheduler.manual.push (open2);
node2.scheduler.manual.push (open2->clone ());
ASSERT_TIMELY (5s, (election = node2.active.election (open2->qualified_root ())) != nullptr);
election->transition_active ();

Expand All @@ -928,8 +928,8 @@ TEST (node, fork_open_flip)
ASSERT_TIMELY (5s, node1.block_confirmed (open1->hash ()));

// Notify both nodes of both blocks, both nodes will become aware that a fork exists
node1.process_active (open2);
node2.process_active (open1);
node1.process_active (open2->clone ());
node2.process_active (open1->clone ());

ASSERT_TIMELY_EQ (5s, 2, election->votes ().size ()); // one more than expected due to elections having dummy votes

Expand Down
4 changes: 2 additions & 2 deletions nano/test_common/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,13 @@ void nano::test::system::setup_node (nano::node & node)

for (auto block : initialization_blocks)
{
auto result = node.ledger.process (transaction, block);
auto result = node.ledger.process (transaction, block->clone ());
debug_assert (result == nano::block_status::progress);
}

for (auto block : initialization_blocks_cemented)
{
auto result = node.ledger.process (transaction, block);
auto result = node.ledger.process (transaction, block->clone ());
debug_assert (result == nano::block_status::progress);

auto cemented = node.ledger.confirm (transaction, block->hash ());
Expand Down
Loading