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 #149 from anton-rs/refcell/final-small-fixes
Browse files Browse the repository at this point in the history
Final Small Fixes
  • Loading branch information
refcell authored Oct 31, 2023
2 parents a150662 + b3c4867 commit b752b9e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
6 changes: 3 additions & 3 deletions crates/net/network/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pub struct NetworkConfig<C> {

/// Optimmism Network Config
#[cfg(feature = "optimism")]
#[derive(Debug)]
#[derive(Debug, Clone, Default)]
pub struct OptimismNetworkConfig {
/// The sequencer HTTP endpoint, if provided via CLI flag
pub sequencer_endpoint: Option<String>,
Expand Down Expand Up @@ -171,7 +171,7 @@ pub struct NetworkConfigBuilder {
/// Optimism Network Config Builder
#[cfg(feature = "optimism")]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug)]
#[derive(Debug, Clone, Default)]
pub struct OptimismNetworkConfigBuilder {
/// The sequencer HTTP endpoint, if provided via CLI flag
sequencer_endpoint: Option<String>,
Expand All @@ -198,7 +198,7 @@ impl NetworkConfigBuilder {
head: None,
tx_gossip_disabled: false,
#[cfg(feature = "optimism")]
optimism_network_config: OptimismNetworkConfigBuilder { sequencer_endpoint: None },
optimism_network_config: OptimismNetworkConfigBuilder::default(),
}
}

Expand Down
5 changes: 1 addition & 4 deletions crates/payload/builder/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ use reth_transaction_pool::BlobStoreError;
use revm_primitives::EVMError;
use tokio::sync::oneshot;

#[cfg(feature = "optimism")]
use revm_primitives::Address;

/// Possible error variants during payload building.
#[derive(Debug, thiserror::Error)]
pub enum PayloadBuilderError {
Expand Down Expand Up @@ -52,7 +49,7 @@ pub enum OptimismPayloadBuilderError {
/// Thrown when a database account could not be loaded.
#[error("failed to load account {0:?}")]
#[cfg(feature = "optimism")]
AccountLoadFailed(Address),
AccountLoadFailed(revm_primitives::Address),
}

impl From<oneshot::error::RecvError> for PayloadBuilderError {
Expand Down
3 changes: 0 additions & 3 deletions crates/rpc/rpc-types/src/eth/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,13 @@ pub struct Transaction {
#[derive(Debug, Default, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct OptimismTransactionFields {
/// Hash that uniquely identifies the source of the deposit.
#[cfg(feature = "optimism")]
#[serde(rename = "sourceHash", skip_serializing_if = "Option::is_none")]
pub source_hash: Option<B256>,
/// The ETH value to mint on L2
#[cfg(feature = "optimism")]
#[serde(rename = "mint", skip_serializing_if = "Option::is_none")]
pub mint: Option<U128>,
/// Field indicating whether the transaction is a system transaction, and therefore
/// exempt from the L2 gas limit.
#[cfg(feature = "optimism")]
#[serde(rename = "isSystemTx", skip_serializing_if = "Option::is_none")]
pub is_system_tx: Option<bool>,
}
Expand Down
2 changes: 1 addition & 1 deletion crates/rpc/rpc/src/eth/api/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ where
)
}

/// Helper function for `eth_send_raw_transaction` for Optimism.
/// Helper function for `eth_sendRawTransaction` for Optimism.
///
/// Forwards the raw transaction bytes to the configured sequencer endpoint.
/// This is a no-op if the sequencer endpoint is not configured.
Expand Down

0 comments on commit b752b9e

Please sign in to comment.