From b250a7904369a4e4ea0b8e2d7667f74bfef553f6 Mon Sep 17 00:00:00 2001 From: scooletz Date: Wed, 18 Dec 2024 12:49:01 +0100 Subject: [PATCH] CLI verify prints the original root hash first --- src/Paprika.Cli/VerifyWholeTreeSettings.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Paprika.Cli/VerifyWholeTreeSettings.cs b/src/Paprika.Cli/VerifyWholeTreeSettings.cs index ffec110d..492c2527 100644 --- a/src/Paprika.Cli/VerifyWholeTreeSettings.cs +++ b/src/Paprika.Cli/VerifyWholeTreeSettings.cs @@ -16,12 +16,13 @@ public override int Execute(CommandContext context, VerifyWholeTreeSettings sett using var read = db.BeginReadOnlyBatch(); using var latest = Blockchain.StartReadOnlyLatestFromDb(db); - AnsiConsole.WriteLine("Checking whole tree..."); - var keccak = new ComputeMerkleBehavior().CalculateStateRootHash(latest); + AnsiConsole.WriteLine($"The latest state root hash persisted: {latest.Hash}."); + AnsiConsole.WriteLine("Verification of the whole state tree in progress..."); - AnsiConsole.WriteLine($"Keccak {keccak.ToString()}"); + var keccak = new ComputeMerkleBehavior().CalculateStateRootHash(latest); + AnsiConsole.WriteLine($"The computed state root hash {keccak.ToString()}"); return 0; }