mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
add hash check in transaction unmarshalling
This commit is contained in:
parent
a71f6f91fd
commit
3380423825
1 changed files with 4 additions and 1 deletions
|
|
@ -416,6 +416,9 @@ func (tx *Transaction) UnmarshalJSON(input []byte) error {
|
|||
// Now set the inner transaction.
|
||||
tx.setDecoded(inner, 0)
|
||||
|
||||
// TODO: check hash here?
|
||||
if dec.Hash != tx.Hash() {
|
||||
return errors.New("hash mismatch")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue