mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-29 09:08:05 -05:00
chore: prevent redundant hash initialization (#947)
This commit is contained in:
@@ -667,8 +667,8 @@ impl Decodable for TransactionSigned {
|
||||
s: Decodable::decode(buf)?,
|
||||
};
|
||||
|
||||
let mut signed = TransactionSigned { transaction, hash: Default::default(), signature };
|
||||
signed.hash = keccak256(&original_encoding[..first_header.payload_length]);
|
||||
let hash = keccak256(&original_encoding[..first_header.payload_length]);
|
||||
let signed = TransactionSigned { transaction, hash, signature };
|
||||
Ok(signed)
|
||||
} else {
|
||||
let mut transaction = Transaction::Legacy(TxLegacy {
|
||||
|
||||
Reference in New Issue
Block a user