From bdbefc601f4ecec4f807c431cd98adbec99bb2f7 Mon Sep 17 00:00:00 2001 From: gr0vity-dev <85646666+gr0vity-dev@users.noreply.github.com> Date: Sat, 7 Dec 2024 13:14:00 +0100 Subject: [PATCH] Fix ledger_priority.sequential_blocks testcase (#4805) 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 Co-authored-by: gr0vity --- 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..f1a156fb64 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_GE (timestamp2, send1->sideband ().timestamp); // key1 account + ASSERT_EQ (open->sideband ().timestamp, timestamp3); // key1 account } // Test priority after rolling back state blocks