diff --git a/ledger-tool/src/main.rs b/ledger-tool/src/main.rs index d4a5a3eb18ea69..272c6ec3ddc7c6 100644 --- a/ledger-tool/src/main.rs +++ b/ledger-tool/src/main.rs @@ -2024,8 +2024,20 @@ fn main() { } } + let pre_capitalization = bank.capitalization(); + bank.set_capitalization(); + let post_capitalization = bank.capitalization(); + if pre_capitalization != post_capitalization { + let amount = if pre_capitalization > post_capitalization { + format!("-{}", pre_capitalization - post_capitalization) + } else { + (post_capitalization - pre_capitalization).to_string() + }; + warn!("Capitalization change: {amount} lamports"); + } + let bank = if let Some(warp_slot) = warp_slot { // need to flush the write cache in order to use Storages to calculate // the accounts hash, and need to root `bank` before flushing the cache