Skip to content

Commit

Permalink
fix: lint + tests
Browse files Browse the repository at this point in the history
Signed-off-by: Gregory Edison <[email protected]>
  • Loading branch information
greged93 committed Jan 21, 2025
1 parent be98dad commit 5930d77
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
partition: 2
total_partitions: 2
- type: scroll
args: -p "reth-scroll-*" --locked --features "scroll"
args: -p "reth-scroll-*" -p "scroll-alloy-*" --locked --features "scroll"
partition: 1
total_partitions: 1
- type: book
Expand Down
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.

2 changes: 0 additions & 2 deletions crates/scroll/alloy/consensus/src/receipt/receipt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,6 @@ mod tests {
receipt.encode(&mut data);
let decoded = ScrollReceiptWithBloom::decode(&mut &data[..]).unwrap();

// receipt.clone().to_compact(&mut data);
// let (decoded, _) = Receipt::from_compact(&data[..], data.len());
assert_eq!(decoded, receipt);
}
}
9 changes: 9 additions & 0 deletions crates/scroll/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ alloy-rpc-types-engine.workspace = true
reth-scroll-chainspec.workspace = true
reth-scroll-engine.workspace = true
reth-scroll-evm.workspace = true
reth-scroll-primitives = { workspace = true, features = ["serde", "serde-bincode-compat"] }
reth-scroll-rpc.workspace = true

# alloy
Expand All @@ -48,6 +49,7 @@ alloy-primitives.workspace = true
eyre.workspace = true

[features]
default = ["reth-codec"]
optimism = [
"reth-db/optimism",
"reth-primitives/optimism",
Expand All @@ -65,5 +67,12 @@ scroll = [
"reth-scroll-evm/scroll",
"reth-scroll-engine/scroll",
"reth-scroll-rpc/scroll",
"reth-scroll-primitives/scroll",
"reth-primitives-traits/scroll"
]
reth-codec = [
"reth-primitives/reth-codec",
"reth-primitives-traits/reth-codec",
"reth-scroll-primitives/reth-codec"
]
skip-state-root-validation = []
2 changes: 1 addition & 1 deletion crates/scroll/primitives/src/receipt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub enum ScrollReceipt {
}

impl ScrollReceipt {
/// Returns [`OpTxType`] of the receipt.
/// Returns [`ScrollTxType`] of the receipt.
pub const fn tx_type(&self) -> ScrollTxType {
match self {
Self::Legacy(_) => ScrollTxType::Legacy,
Expand Down
2 changes: 1 addition & 1 deletion crates/scroll/primitives/src/transaction/signed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl ScrollTransactionSigned {

/// Creates a new signed transaction from the given transaction and signature without the hash.
///
/// Note: this only calculates the hash on the first [`OpTransactionSigned::hash`] call.
/// Note: this only calculates the hash on the first [`ScrollTransactionSigned::hash`] call.
pub fn new_unhashed(transaction: ScrollTypedTransaction, signature: Signature) -> Self {
Self { hash: Default::default(), signature, transaction }
}
Expand Down
4 changes: 2 additions & 2 deletions crates/scroll/primitives/src/transaction/tx_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ mod tests {

assert_eq!(
identifier, expected_identifier,
"Unexpected identifier for OpTxType {tx_type:?}",
"Unexpected identifier for ScrollTxType {tx_type:?}",
);
assert_eq!(buf, expected_buf, "Unexpected buffer for OpTxType {tx_type:?}",);
assert_eq!(buf, expected_buf, "Unexpected buffer for ScrollTxType {tx_type:?}",);
}

#[rstest]
Expand Down

0 comments on commit 5930d77

Please sign in to comment.