Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: include path in panic #12407

Merged
merged 2 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions crates/primitives/src/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1755,8 +1755,6 @@ pub mod serde_bincode_compat {
TxEip4844,
};
use alloy_primitives::{PrimitiveSignature as Signature, TxHash};
#[cfg(feature = "optimism")]
use op_alloy_consensus::serde_bincode_compat::TxDeposit;
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use serde_with::{DeserializeAs, SerializeAs};

Expand Down Expand Up @@ -1784,8 +1782,7 @@ pub mod serde_bincode_compat {
Eip4844(Cow<'a, TxEip4844>),
Eip7702(TxEip7702<'a>),
#[cfg(feature = "optimism")]
#[cfg(feature = "optimism")]
Deposit(TxDeposit<'a>),
Deposit(op_alloy_consensus::serde_bincode_compat::TxDeposit<'a>),
}

impl<'a> From<&'a super::Transaction> for Transaction<'a> {
Expand All @@ -1797,7 +1794,9 @@ pub mod serde_bincode_compat {
super::Transaction::Eip4844(tx) => Self::Eip4844(Cow::Borrowed(tx)),
super::Transaction::Eip7702(tx) => Self::Eip7702(TxEip7702::from(tx)),
#[cfg(feature = "optimism")]
super::Transaction::Deposit(tx) => Self::Deposit(TxDeposit::from(tx)),
super::Transaction::Deposit(tx) => {
Self::Deposit(op_alloy_consensus::serde_bincode_compat::TxDeposit::from(tx))
}
}
}
}
Expand Down Expand Up @@ -1900,7 +1899,6 @@ pub mod serde_bincode_compat {
#[cfg(test)]
mod tests {
use super::super::{serde_bincode_compat, Transaction, TransactionSigned};

use arbitrary::Arbitrary;
use rand::Rng;
use reth_testing_utils::generators;
Expand Down
10 changes: 4 additions & 6 deletions crates/storage/db/benches/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@ where
T::Key: Default + Clone + for<'de> serde::Deserialize<'de>,
T::Value: Default + Clone + for<'de> serde::Deserialize<'de>,
{
let path =
format!("{}/../../../testdata/micro/db/{}.json", env!("CARGO_MANIFEST_DIR"), T::NAME);
let list: Vec<TableRow<T>> = serde_json::from_reader(std::io::BufReader::new(
std::fs::File::open(format!(
"{}/../../../testdata/micro/db/{}.json",
env!("CARGO_MANIFEST_DIR"),
T::NAME
))
.expect("Test vectors not found. They can be generated from the workspace by calling `cargo run --bin reth --features dev -- test-vectors tables`."),
std::fs::File::open(&path)
.unwrap_or_else(|_| panic!("Test vectors not found. They can be generated from the workspace by calling `cargo run --bin reth --features dev -- test-vectors tables`: {:?}", path))
))
.unwrap();

Expand Down
Loading