core: set Tx for interop.Context when verifying witnesses

Notary contract uses it in the verification context and it's not harmful to
have it always be there when it's there.
This commit is contained in:
Roman Khimov 2022-08-22 13:38:43 +03:00
parent 606597b9a1
commit 9916832e2e

View file

@ -2337,6 +2337,9 @@ func (bc *Blockchain) InitVerificationContext(ic *interop.Context, hash util.Uin
func (bc *Blockchain) VerifyWitness(h util.Uint160, c hash.Hashable, w *transaction.Witness, gas int64) (int64, error) {
ic := bc.newInteropContext(trigger.Verification, bc.dao, nil, nil)
ic.Container = c
if tx, ok := c.(*transaction.Transaction); ok {
ic.Tx = tx
}
return bc.verifyHashAgainstScript(h, w, ic, gas)
}