Skip to content

Commit

Permalink
fix: import vec
Browse files Browse the repository at this point in the history
  • Loading branch information
prestwich committed Oct 17, 2024
1 parent 965eefb commit a321295
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
10 changes: 3 additions & 7 deletions crates/consensus/src/transaction/legacy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,17 +271,13 @@ impl SignableTransaction<Signature> for TxLegacy {
}

fn encode_for_signing(&self, out: &mut dyn BufMut) {
let mut v = vec![];

Header {
list: true,
payload_length: self.rlp_encoded_fields_length() + self.eip155_fields_len(),
}
.encode(&mut v);
self.rlp_encode_fields(&mut v);
self.encode_eip155_signing_fields(&mut v);

out.put_slice(v.as_slice());
.encode(out);
self.rlp_encode_fields(out);
self.encode_eip155_signing_fields(out);
}

fn payload_len_for_signature(&self) -> usize {
Expand Down
1 change: 1 addition & 0 deletions crates/consensus/src/transaction/rlp.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::{SignableTransaction, Signed};
use alloc::vec::Vec;
use alloy_eips::eip2718::{Eip2718Error, Eip2718Result};
use alloy_primitives::{keccak256, Parity, Signature, TxHash};
use alloy_rlp::{Buf, BufMut, Header};
Expand Down

0 comments on commit a321295

Please sign in to comment.