Skip to content

Commit

Permalink
chore: expose original value on storageslot (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Sep 12, 2022
1 parent aa39d64 commit 1e25c99
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crates/revm/src/journaled_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@ impl StorageSlot {
present_value: original,
}
}

/// Returns true if the present value differs from the original value
pub fn is_changed(&self) -> bool {
self.original_value != self.present_value
}

pub fn original_value(&self) -> U256 {
self.original_value
}

pub fn present_value(&self) -> U256 {
self.present_value
}
Expand Down

0 comments on commit 1e25c99

Please sign in to comment.