Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve OriginalValuesKnown docs #1083

Merged
merged 1 commit into from
Feb 12, 2024
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
18 changes: 9 additions & 9 deletions crates/revm/src/db/states/bundle_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@ pub struct BundleBuilder {
/// Option for [`BundleState`] when converting it to the plain state.
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum OriginalValuesKnown {
/// Check changed with original values that [BundleState] has
/// If we dont expect parent blocks to be committed or unwinded from database
/// this option should be used.
/// Check changed with original values that [BundleState] has.
///
/// If we don't expect parent blocks to be committed or unwinded from database, this option
/// should be used.
Yes,
/// Dont check original values, see CheckOriginalValues for more info.
/// If Bundle can be split or extended we would not be sure about
/// original values so this option should be used.
/// Don't check original values, see the implementation of [BundleState::into_plain_state] for
/// more info.
///
/// If the Bundle can be split or extended, we would not be sure about original values, in that
/// case this option should be used.
No,
}
impl OriginalValuesKnown {
Expand Down Expand Up @@ -262,9 +265,6 @@ pub struct BundleState {
pub contracts: HashMap<B256, Bytecode>,
/// Changes to revert.
///
/// If `should_collect_reverts` flag was set to `false`,
/// the revert for any given block will be just an empty array.
///
/// Note: Inside vector is *not* sorted by address.
/// But it is unique by address.
pub reverts: Reverts,
Expand Down
Loading