Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
ncitron committed Jan 12, 2024
1 parent f7c47dc commit c0dbf3c
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 7 deletions.
8 changes: 7 additions & 1 deletion src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl FromStr for SyncMode {
}

/// A system configuration
#[derive(Debug, Clone, Deserialize)]
#[derive(Debug, Clone, Deserialize, Default)]
pub struct Config {
/// The base chain RPC URL
pub l1_rpc_url: String,
Expand Down Expand Up @@ -152,6 +152,12 @@ pub struct ChainConfig {
pub l2_to_l1_message_passer: Address,
}

impl Default for ChainConfig {
fn default() -> Self {
ChainConfig::optimism()
}
}

/// Optimism system config contract values
#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
pub struct SystemConfig {
Expand Down
2 changes: 1 addition & 1 deletion src/derive/stages/batches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ where
next_epoch
} else {
tracing::warn!("invalid batch origin epoch number");
println!("{}, {}", batch.l1_origin_num, epoch.number);
return BatchStatus::Drop;
};

Expand Down Expand Up @@ -302,7 +303,6 @@ where
return BatchStatus::Drop;
}

// is this right?
if start_epoch_num > epoch.number + 1 {
return BatchStatus::Drop;
}
Expand Down
1 change: 1 addition & 0 deletions src/derive/stages/block_input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pub trait EpochType {}
impl EpochType for u64 {}
impl EpochType for Epoch {}

#[derive(Debug)]
pub struct BlockInput<E: EpochType> {
pub timestamp: u64,
pub epoch: E,
Expand Down
25 changes: 20 additions & 5 deletions src/derive/stages/span_batch.rs

Large diffs are not rendered by default.

0 comments on commit c0dbf3c

Please sign in to comment.