Skip to content

Commit

Permalink
chore(op): rename file_codec_ovm_receipt.rs to receipt_file_codec.rs (p…
Browse files Browse the repository at this point in the history
  • Loading branch information
nkysg authored Aug 30, 2024
1 parent 237c22f commit b4a18cc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions crates/net/downloaders/src/receipt_file_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,14 +381,14 @@ mod test {
.unwrap(),
};

// #[allow(clippy::needless_update)] not recognised, ..Default::default() needed so optimism
// feature must not be brought into scope
let mut receipt = Receipt {
tx_type: TxType::Legacy,
success: true,
cumulative_gas_used: 202819,
..Default::default()
};
// #[allow(clippy::needless_update)] not recognised, ..Default::default() needed so optimism
// feature must not be brought into scope
receipt.logs = vec![log_1, log_2, log_3];

ReceiptWithBlockNumber { receipt, number: 1 }
Expand Down Expand Up @@ -433,14 +433,14 @@ mod test {
.unwrap(),
};

// #[allow(clippy::needless_update)] not recognised, ..Default::default() needed so optimism
// feature must not be brought into scope
let mut receipt = Receipt {
tx_type: TxType::Legacy,
success: true,
cumulative_gas_used: 116237,
..Default::default()
};
// #[allow(clippy::needless_update)] not recognised, ..Default::default() needed so optimism
// feature must not be brought into scope
receipt.logs = vec![log_1, log_2];

ReceiptWithBlockNumber { receipt, number: 2 }
Expand Down Expand Up @@ -485,14 +485,14 @@ mod test {
.unwrap(),
};

// #[allow(clippy::needless_update)] not recognised, ..Default::default() needed so optimism
// feature must not be brought into scope
let mut receipt = Receipt {
tx_type: TxType::Legacy,
success: true,
cumulative_gas_used: 116237,
..Default::default()
};
// #[allow(clippy::needless_update)] not recognised, ..Default::default() needed so optimism
// feature must not be brought into scope
receipt.logs = vec![log_1, log_2];

ReceiptWithBlockNumber { receipt, number: 3 }
Expand Down
4 changes: 2 additions & 2 deletions crates/optimism/cli/src/commands/import_receipts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use reth_stages::StageId;
use reth_static_file_types::StaticFileSegment;
use tracing::{debug, error, info, trace};

use crate::file_codec_ovm_receipt::HackReceiptFileCodec;
use crate::receipt_file_codec::HackReceiptFileCodec;

/// Initializes the database with the genesis block.
#[derive(Debug, Parser)]
Expand Down Expand Up @@ -259,7 +259,7 @@ mod test {
io::{AsyncSeekExt, AsyncWriteExt, SeekFrom},
};

use crate::file_codec_ovm_receipt::test::{
use crate::receipt_file_codec::test::{
HACK_RECEIPT_ENCODED_BLOCK_1, HACK_RECEIPT_ENCODED_BLOCK_2, HACK_RECEIPT_ENCODED_BLOCK_3,
};

Expand Down
4 changes: 2 additions & 2 deletions crates/optimism/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ pub mod commands;
///
/// Enables decoding and encoding `HackReceipt` type. See <https://github.com/testinprod-io/op-geth/pull/1>.
///
/// Currently configured to use codec [`HackReceipt`](file_codec_ovm_receipt::HackReceipt) based on
/// Currently configured to use codec [`HackReceipt`](receipt_file_codec::HackReceipt) based on
/// export of below Bedrock data using <https://github.com/testinprod-io/op-geth/pull/1>. Codec can
/// be replaced with regular encoding of receipts for export.
///
/// NOTE: receipts can be exported using regular op-geth encoding for `Receipt` type, to fit
/// reth's needs for importing. However, this would require patching the diff in <https://github.com/testinprod-io/op-geth/pull/1> to export the `Receipt` and not `HackReceipt` type (originally
/// made for op-erigon's import needs).
pub mod file_codec_ovm_receipt;
pub mod receipt_file_codec;

pub use commands::{import::ImportOpCommand, import_receipts::ImportReceiptsOpCommand};

Expand Down

0 comments on commit b4a18cc

Please sign in to comment.