Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions bins/revme/src/cmd/blockchaintest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,10 @@ fn print_error_with_state(

// Print state comparison
eprintln!("\n💾 Pre-State (Initial):");
for (address, (info, storage)) in &debug_info.pre_state {
// Sort accounts by address for consistent output
let mut sorted_accounts: Vec<_> = debug_info.pre_state.iter().collect();
sorted_accounts.sort_by_key(|(addr, _)| *addr);
for (address, (info, storage)) in sorted_accounts {
eprintln!(" Account {address:?}:");
eprintln!(" Balance: 0x{:x}", info.balance);
eprintln!(" Nonce: {}", info.nonce);
Expand All @@ -580,7 +583,10 @@ fn print_error_with_state(

eprintln!("\n📝 Current State (Actual):");
let committed_state = DebugInfo::capture_committed_state(current_state);
for (address, (info, storage)) in &committed_state {
// Sort accounts by address for consistent output
let mut sorted_current: Vec<_> = committed_state.iter().collect();
sorted_current.sort_by_key(|(addr, _)| *addr);
for (address, (info, storage)) in sorted_current {
eprintln!(" Account {address:?}:");
eprintln!(" Balance: 0x{:x}", info.balance);
eprintln!(" Nonce: {}", info.nonce);
Expand Down
Loading