mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: use vec for encoding (#9442)
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user