Skip to content
This repository has been archived by the owner on Nov 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #77 from anton-rs/refcell/small-nit-fixes
Browse files Browse the repository at this point in the history
fix(nits): Fixes some nits
  • Loading branch information
refcell authored Aug 17, 2023
2 parents ff1f580 + fc6bb20 commit 833da96
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 17 deletions.
8 changes: 1 addition & 7 deletions bin/reth/src/node/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ pub struct NodeCommand<Ext: RethCliExt = ()> {
#[clap(flatten)]
pub ext: Ext::Node,

/// Rollup related arguments
#[cfg(feature = "optimism")]
#[clap(flatten)]
rollup: crate::args::RollupArgs,
Expand Down Expand Up @@ -210,13 +211,6 @@ impl<Ext: RethCliExt> NodeCommand<Ext> {
"Either feature \"optimism\" or \"ethereum\" must be enabled for this crate."
);

// We cannot do this since runs with `--all-features` will error.
// See mutually exclusive features discussion here:
// https://github.com/rust-lang/cargo/issues/2980
//
// #[cfg(all(feature = "ethereum", feature = "optimism"))]
// compile_error!("Cannot use both \"optimism\" and \"ethereum\" feature flags.");

// Raise the fd limit of the process.
// Does not do anything on windows.
raise_fd_limit();
Expand Down
1 change: 1 addition & 0 deletions crates/interfaces/src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ pub enum BlockExecutionError {
CanonicalRevert { inner: String },
#[error("Transaction error on commit: {inner:?}")]
CanonicalCommit { inner: String },

// === tree errors ===
// TODO(mattsse): move this to tree error
#[error("Block hash {block_hash} not found in blockchain tree chain")]
Expand Down
12 changes: 2 additions & 10 deletions crates/primitives/src/receipt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,21 +205,13 @@ impl proptest::arbitrary::Arbitrary for Receipt {
logs in proptest::collection::vec(proptest::arbitrary::any::<Log>(), 0..=20),
_deposit_nonce in any::<Option<u64>>()) -> Receipt
{

// Only reecipts for deposit transactions may contain a deposit nonce
#[cfg(feature = "optimism")]
let deposit_nonce = if tx_type == TxType::DEPOSIT {
_deposit_nonce
} else {
None
};

Receipt { tx_type,
success,
cumulative_gas_used,
logs,
// Only reecipts for deposit transactions may contain a deposit nonce
#[cfg(feature = "optimism")]
deposit_nonce
deposit_nonce: (tx_type == TxType::DEPOSIT).then_some(_deposit_nonce).flatten()
}
}
};
Expand Down

0 comments on commit 833da96

Please sign in to comment.