This commit is contained in:
rrhlrmrr 2025-02-19 16:07:32 +01:00 committed by GitHub
commit 1e9f00bc3e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -514,6 +514,11 @@ func (tx *Transaction) UnmarshalJSON(input []byte) error {
// Now set the inner transaction. // Now set the inner transaction.
tx.setDecoded(inner, 0) tx.setDecoded(inner, 0)
// TODO: check hash here? if dec.Hash != (common.Hash{}) {
computedHash := tx.Hash()
if computedHash != dec.Hash {
return errors.New("transaction hash mismatch")
}
}
return nil return nil
} }