feat(app): flag transactions above the newest checkpoint as not anchored

Blocks mined after the newest hardcoded checkpoint cannot be chained to it,
so only the Merkle proof against the server's header backs them. The
history list and the transaction detail now show a 'not anchored' label
for those transactions. Informational only: spending is not blocked.
See ADR 0041.
This commit is contained in:
davide committed 2026-11-03 15:11:06 +01:00
1 parent 24368a07b5
commit 305f22ed0e
13 files changed
+119 -7

No files matched your search

+9
View File
@@ -140,4 +140,13 @@ public sealed record ChainProfile
/// <summary>Hardcoded checkpoints, updated at every release (§7.3).</summary>
public required IReadOnlyList<Checkpoint> Checkpoints { get; init; }
/// <summary>
/// True for a block above the newest checkpoint of a profile that has checkpoints: its header
/// cannot be anchored (ADR 0040), so only the server-supplied header and the Merkle proof back
/// it. False for confirmed history the anchoring covers, and for profiles without any
/// checkpoint (testnet/regtest), where nothing is anchored by design and the notion does not apply.
/// </summary>
public bool IsAboveNewestCheckpoint(int height) =>
height > 0 && Checkpoints.Count > 0 && height > Checkpoints.Max(c => c.Height);
}