From bd1216f1d57fe11c61d7d57da35f78099848c7c5 Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Tue, 13 Feb 2024 10:59:31 -0700 Subject: [PATCH] Print capitalization message at end --- ledger-tool/src/main.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ledger-tool/src/main.rs b/ledger-tool/src/main.rs index d77c6f45bbca2a..ef3f6515dfcd8f 100644 --- a/ledger-tool/src/main.rs +++ b/ledger-tool/src/main.rs @@ -2062,7 +2062,7 @@ fn main() { let post_capitalization = bank.capitalization(); - if pre_capitalization != post_capitalization { + let capitalization_message = if pre_capitalization != post_capitalization { let amount = if pre_capitalization > post_capitalization { format!("-{}", pre_capitalization - post_capitalization) } else { @@ -2076,7 +2076,10 @@ fn main() { ); exit(1); } - } + Some(msg) + } else { + None + }; let bank = if let Some(warp_slot) = warp_slot { // need to flush the write cache in order to use Storages to calculate @@ -2204,6 +2207,9 @@ fn main() { } } + if let Some(msg) = capitalization_message { + println!("{msg}"); + } println!( "Shred version: {}", compute_shred_version(&genesis_config.hash(), Some(&bank.hard_forks()))