Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Oct 1, 2024
1 parent 745b95d commit 3ef0f07
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions crates/consensus/src/transaction/eip7702.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,7 @@ impl Decodable for TxEip7702 {
/// Bincode-compatible [`TxEip7702`] serde implementation.
#[cfg(all(feature = "serde", feature = "serde-bincode-compat"))]
pub(super) mod serde_bincode_compat {
use alloc::borrow::Cow;
use alloc::vec::Vec;
use alloc::{borrow::Cow, vec::Vec};
use alloy_eips::{eip2930::AccessList, eip7702::serde_bincode_compat::SignedAuthorization};
use alloy_primitives::{Address, Bytes, ChainId, U256};
use serde::{Deserialize, Deserializer, Serialize, Serializer};
Expand Down Expand Up @@ -511,7 +510,6 @@ pub(super) mod serde_bincode_compat {
}
}


#[cfg(all(test, feature = "k256"))]
mod tests {
use super::TxEip7702;
Expand Down Expand Up @@ -539,7 +537,7 @@ mod tests {
b256!("25e7109ceb98168d95b09b18bbf6b685130e0562f233877d492b94eee0c5b6d1"),
false,
)
.unwrap();
.unwrap();

let mut buf = vec![];
tx.encode_with_signature_fields(&sig, &mut buf);
Expand Down Expand Up @@ -567,7 +565,7 @@ mod tests {
b256!("25e7109ceb98168d95b09b18bbf6b685130e0562f233877d492b94eee0c5b6d1"),
false,
)
.unwrap();
.unwrap();
let mut buf = vec![];
tx.encode_with_signature_fields(&sig, &mut buf);
let decoded = TxEip7702::decode_signed_fields(&mut &buf[..]).unwrap();
Expand All @@ -594,11 +592,11 @@ mod tests {
b256!("25e7109ceb98168d95b09b18bbf6b685130e0562f233877d492b94eee0c5b6d1"),
false,
)
.unwrap();
.unwrap();

let mut buf = vec![];
tx.encode_with_signature_fields(&sig, &mut buf);
let decoded = TxEip7702::decode_signed_fields(&mut &buf[..]).unwrap();
assert_eq!(decoded, tx.into_signed(sig));
}
}
}

0 comments on commit 3ef0f07

Please sign in to comment.