Skip to content

Commit

Permalink
refactor: add Send and Sync as supertraits of fillers (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
prestwich authored Dec 2, 2024
1 parent 20cc895 commit 99bc831
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/fill/alloy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ impl Block for alloy::rpc::types::eth::Header {
}
}

impl<T> Block for alloy::rpc::types::eth::Block<T> {
impl<T: Send + Sync> Block for alloy::rpc::types::eth::Block<T> {
fn fill_block_env(&self, block_env: &mut revm::primitives::BlockEnv) {
self.header.fill_block_env(block_env);
}
Expand Down
6 changes: 3 additions & 3 deletions src/fill/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use revm::{
};

/// Types that can fill the EVM transaction environment [`TxEnv`].
pub trait Tx {
pub trait Tx: Send + Sync {
/// Fill the transaction environment.
///
/// ## Note:
Expand All @@ -23,7 +23,7 @@ pub trait Tx {
}
}
/// Types that can fill the EVM block environment [`BlockEnv`].
pub trait Block {
pub trait Block: Send + Sync {
/// Fill the block environment.
///
/// ## Note:
Expand Down Expand Up @@ -64,7 +64,7 @@ pub trait Block {
/// - `disable_beneficiary_reward` - gated by `optional_beneficiary_reward`
///
/// Cfg fillers should consider these feature gates when implementing the trait.
pub trait Cfg {
pub trait Cfg: Send + Sync {
/// Fill the configuration environment.
fn fill_cfg_env(&self, cfg_env: &mut CfgEnv);

Expand Down

0 comments on commit 99bc831

Please sign in to comment.