Skip to content

Commit

Permalink
Fix account updates print
Browse files Browse the repository at this point in the history
  • Loading branch information
ilitteri committed Nov 26, 2024
1 parent 98d0429 commit 10eecf7
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions cmd/ef_tests/levm/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ impl fmt::Display for AccountUpdatesReport {
updated_account_info.nonce,
updated_account_storage,
);
let mut updates = 0;
if initial_account.info.balance != updated_account.info.balance {
writeln!(
f,
Expand All @@ -395,7 +396,9 @@ impl fmt::Display for AccountUpdatesReport {
)
.red()
)?;
} else if initial_account.info.nonce != updated_account.info.nonce {
updates += 1;
}
if initial_account.info.nonce != updated_account.info.nonce {
writeln!(
f,
"{}",
Expand All @@ -406,7 +409,9 @@ impl fmt::Display for AccountUpdatesReport {
)
.red()
)?;
} else if initial_account.info.bytecode != updated_account.info.bytecode {
updates += 1;
}
if initial_account.info.bytecode != updated_account.info.bytecode {
writeln!(
f,
"{}",
Expand All @@ -417,7 +422,9 @@ impl fmt::Display for AccountUpdatesReport {
)
.red()
)?;
} else {
updates += 1;
}
if updates == 0 {
writeln!(f, "{}", " No changes".green())?;
}
}
Expand Down

0 comments on commit 10eecf7

Please sign in to comment.