Skip to content

Commit

Permalink
Use a more friendly printer (nervosnetwork#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanson authored Sep 5, 2024
1 parent 3bd452b commit af09691
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ckb-debugger/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,9 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
)
};
verifier.set_debug_printer(Box::new(move |_hash: &Byte32, message: &str| {
print!("Script log: {}", message);
if !message.ends_with('\n') {
println!("");
let message = message.trim_end_matches('\n');
if message != "" {
println!("Script log: {}", message);
}
}));
let verifier_script_group = verifier.find_script_group(verifier_script_group_type, &verifier_script_hash).unwrap();
Expand Down

0 comments on commit af09691

Please sign in to comment.