mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-29 09:08:05 -05:00
chore: prevent redundant hash initialization (#944)
This commit is contained in:
@@ -685,9 +685,9 @@ impl Decodable for TransactionSigned {
|
||||
transaction.set_chain_id(id);
|
||||
}
|
||||
|
||||
let mut signed = TransactionSigned { transaction, hash: Default::default(), signature };
|
||||
let tx_length = first_header.payload_length + first_header.length();
|
||||
signed.hash = keccak256(&original_encoding[..tx_length]);
|
||||
let hash = keccak256(&original_encoding[..tx_length]);
|
||||
let signed = TransactionSigned { transaction, hash, signature };
|
||||
Ok(signed)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user