Skip to content

Commit

Permalink
Fix ledger_priority.sequential_blocks testcase
Browse files Browse the repository at this point in the history
Different account chains are ot guaranteed to have the same priority timestamp. Openening could happen much later, independant of the sending. It can be euqal or greater
  • Loading branch information
gr0vity committed Dec 7, 2024
1 parent a865db5 commit 0e984b4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions nano/core_test/ledger_priority.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,10 @@ TEST (ledger_priority, sequential_blocks)
ASSERT_EQ (100, priority_balance2);
ASSERT_EQ (100, priority_balance3); // Max of current (50) and previous (100)

ASSERT_EQ (nano::dev::genesis->sideband ().timestamp, timestamp1);
ASSERT_EQ (send1->sideband ().timestamp, timestamp2);
ASSERT_EQ (open->sideband ().timestamp, timestamp3);
ASSERT_EQ (nano::dev::genesis->sideband ().timestamp, timestamp1); // genesis account
// Opening account must have equal or greater timestamp than sending counterpart.
ASSERT_GE (timestamp2, send1->sideband ().timestamp); // key1 account
ASSERT_EQ (open->sideband ().timestamp, timestamp3); // key1 account
}

// Test priority after rolling back state blocks
Expand Down

0 comments on commit 0e984b4

Please sign in to comment.