From 6e70bab36e6d8c5dde098485b661cd304dda2d97 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Thu, 11 Jul 2024 13:46:51 +0200 Subject: [PATCH] chore: use vec for encoding (#9442) --- crates/primitives/src/transaction/eip7702.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/primitives/src/transaction/eip7702.rs b/crates/primitives/src/transaction/eip7702.rs index cd2070014e..76b60fa046 100644 --- a/crates/primitives/src/transaction/eip7702.rs +++ b/crates/primitives/src/transaction/eip7702.rs @@ -2,7 +2,6 @@ use super::access_list::AccessList; use crate::{keccak256, Bytes, ChainId, Signature, TxKind, TxType, B256, U256}; use alloy_eips::eip7702::SignedAuthorization; use alloy_rlp::{length_of_length, Decodable, Encodable, Header}; -use bytes::BytesMut; use reth_codecs::{main_codec, Compact}; use std::mem; @@ -233,7 +232,7 @@ impl TxEip7702 { /// Outputs the signature hash of the transaction by first encoding without a signature, then /// hashing. pub(crate) fn signature_hash(&self) -> B256 { - let mut buf = BytesMut::with_capacity(self.payload_len_for_signature()); + let mut buf = Vec::with_capacity(self.payload_len_for_signature()); self.encode_for_signing(&mut buf); keccak256(&buf) }