Skip to content

Commit

Permalink
test: fix k256 gated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
onbjerg committed Mar 11, 2024
1 parent 07d5aea commit d88eba1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions crates/consensus/src/transaction/eip1559.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,9 @@ impl Decodable for TxEip1559 {
#[cfg(all(test, feature = "k256"))]
mod tests {
use super::TxEip1559;
use crate::TxKind;
use crate::SignableTransaction;
use alloy_eips::eip2930::AccessList;
use alloy_network::SignableTransaction;
use alloy_primitives::TxKind;
use alloy_primitives::{address, b256, hex, Address, Signature, B256, U256};
use alloy_rlp::Encodable;

Expand Down
1 change: 1 addition & 0 deletions crates/consensus/src/transaction/envelope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ mod tests {
// Test vector from https://sepolia.etherscan.io/tx/0x9a22ccb0029bc8b0ddd073be1a1d923b7ae2b2ea52100bae0db4424f9107e9c0
// Blobscan: https://sepolia.blobscan.com/tx/0x9a22ccb0029bc8b0ddd073be1a1d923b7ae2b2ea52100bae0db4424f9107e9c0
fn test_decode_live_4844_tx() {
use crate::Transaction;
use alloy_primitives::{address, b256};

// https://sepolia.etherscan.io/getRawTx?tx=0x9a22ccb0029bc8b0ddd073be1a1d923b7ae2b2ea52100bae0db4424f9107e9c0
Expand Down
8 changes: 4 additions & 4 deletions crates/consensus/src/transaction/legacy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,9 @@ mod tests {
#[test]
#[cfg(feature = "k256")]
fn recover_signer_legacy() {
use crate::{TxKind, TxLegacy};
use alloy_network::SignableTransaction;
use alloy_primitives::{address, b256, hex, Signature, U256};
use crate::SignableTransaction;
use crate::TxLegacy;
use alloy_primitives::{address, b256, hex, Signature, TxKind, U256};

let signer = address!("398137383b3d25c92898c656696e41950e47316b");
let hash = b256!("bb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0");
Expand Down Expand Up @@ -296,8 +296,8 @@ mod tests {
#[cfg(feature = "k256")]
// Test vector from https://github.com/alloy-rs/alloy/issues/125
fn decode_legacy_and_recover_signer() {
use crate::Signed;
use crate::TxLegacy;
use alloy_network::Signed;
use alloy_primitives::address;
use alloy_rlp::Decodable;

Expand Down

0 comments on commit d88eba1

Please sign in to comment.