From d2b308dd50af726d4efe432844fd3140a06bc354 Mon Sep 17 00:00:00 2001 From: Anatoly Piskunov Date: Wed, 18 Nov 2026 22:27:16 +0100 Subject: [PATCH] MUTATION CHECK (never merge): rank the tie by the LARGER id This commit exists to prove that the tie-break case added in #283 can fail. A green test that has never been seen red is only an assertion that the fixture runs. If tests/consensus_sim/scenarios/test_certified_sibling_switch.cpp is doing its job, 'tie_between_two_siblings_resolves_to_the_smaller_id' must fail on the testnet arms. Do not merge. Close after the run. --- libraries/chain/database.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/chain/database.cpp b/libraries/chain/database.cpp index 80a4d0d769..7c35ade5ea 100644 --- a/libraries/chain/database.cpp +++ b/libraries/chain/database.cpp @@ -8719,7 +8719,7 @@ namespace graphene { namespace chain { // Strictly more votes than head, or nothing: a move on silence would be a coin // flip between nodes that know different subsets of the siblings. if (n <= head_count) continue; - if (best == head_id || n > best_count || (n == best_count && entry.first < best)) { + if (best == head_id || n > best_count || (n == best_count && entry.first > best)) { best = entry.first; best_count = n; }