-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fixing evm-debug #2161
Fixing evm-debug #2161
Conversation
@@ -113,7 +113,7 @@ impl<'a> Finalize for Result<GasLeft<'a>> { | |||
} | |||
|
|||
/// Cost calculation type. For low-gas usage we calculate costs using usize instead of U256 | |||
pub trait CostType: ops::Mul<Output=Self> + ops::Div<Output=Self> + ops::Add<Output=Self> + ops::Sub<Output=Self> + ops::Shr<usize, Output=Self> + ops::Shl<usize, Output=Self> + cmp::Ord + Sized + From<usize> + Copy { | |||
pub trait CostType: ops::Mul<Output=Self> + ops::Div<Output=Self> + ops::Add<Output=Self> + ops::Sub<Output=Self> + ops::Shr<usize, Output=Self> + ops::Shl<usize, Output=Self> + cmp::Ord + Sized + From<usize> + Copy + fmt::Debug { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line should be broken up
@@ -126,7 +126,7 @@ impl<Cost: CostType> evm::Evm for Interpreter<Cost> { | |||
gasometer.current_gas = gasometer.current_gas - gas_cost; | |||
|
|||
evm_debug!({ | |||
println!("[0x{:x}][{}(0x{:x}) Gas: {:x}\n Gas Before: {:x}", | |||
println!("[0x{:x}][{}(0x{:x}) Gas: {:?}\n Gas Before: {:?}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be one of the logging related macros (probably just debug!
?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's much easier to run/debug tests when there are printlns, cause logs are not initialized in tests. It's also a compilation feature, so when someone is compiling with it I guess you would expect the logs to be always printed.
There's a typo in the trait bounds here, needs fixing before merge. |
Shoot, I'm sorry, I haven't noticed that typo. Thanks! |
No description provided.