Skip to content

Commit

Permalink
fix: the signature length changed
Browse files Browse the repository at this point in the history
  • Loading branch information
geekbrother committed Jul 23, 2024
1 parent 36f02ed commit ee8a1fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ pub fn pack_signature(unpacked: &EthSignature) -> Bytes {
r.to_big_endian(&mut r_bytes);
s.to_big_endian(&mut s_bytes);
// Pack r, s, and v into a single byte array
let mut packed_signature = Vec::with_capacity(65);
let mut packed_signature = Vec::with_capacity(r_bytes.len() + s_bytes.len() + 1);
packed_signature.extend_from_slice(&r_bytes);
packed_signature.extend_from_slice(&s_bytes);
packed_signature.push(v);
Expand Down

0 comments on commit ee8a1fa

Please sign in to comment.