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 #139 from anton-rs/refcell/fix-dispatch
Browse files Browse the repository at this point in the history
fix conditional dispatch
  • Loading branch information
refcell authored Oct 30, 2023
2 parents 4b85a98 + 0a449d2 commit e19b137
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/consensus/beacon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ metrics.workspace = true
tracing.workspace = true
thiserror.workspace = true
schnellru = "0.2"
cfg-if = "1.0.0"

[dev-dependencies]
# reth
Expand Down
9 changes: 8 additions & 1 deletion crates/consensus/beacon/src/engine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,14 @@ where
Ok(outcome) => {
match outcome {
CanonicalOutcome::AlreadyCanonical { ref header } => {
if cfg!(feature = "optimism") && self.chain_spec().optimism {
cfg_if::cfg_if! {
if #[cfg(feautre = "optimism")] {
let optimism = self.chain_spec().optimism;
} else {
let optimism = false;
}
};
if optimism {
debug!(
target: "consensus::engine",
fcu_head_num=?header.number,
Expand Down

0 comments on commit e19b137

Please sign in to comment.