mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 09:23:48 +00:00
check Hash Here
This commit is contained in:
parent
68de26e346
commit
ac02f522ad
1 changed files with 6 additions and 1 deletions
|
|
@ -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("'Hash'transaction hash mismatch")
|
||||||
|
}
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue