From ce5250d277780f436c6290983f0a8eeab34ff242 Mon Sep 17 00:00:00 2001 From: gr0vity Date: Fri, 6 Dec 2024 19:27:39 +0100 Subject: [PATCH] Fix ledger_priority.sequential_blocks testcase 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 --- nano/core_test/ledger_priority.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nano/core_test/ledger_priority.cpp b/nano/core_test/ledger_priority.cpp index 220b72d8c1..df7d6bb682 100644 --- a/nano/core_test/ledger_priority.cpp +++ b/nano/core_test/ledger_priority.cpp @@ -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_TRUE (timestamp2 >= send1->sideband ().timestamp); // key1 account + ASSERT_EQ (open->sideband ().timestamp, timestamp3); // key1 account } // Test priority after rolling back state blocks