From 9916832e2e46fe54dfbee1992cdb8b591af9ab16 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Mon, 22 Aug 2022 13:38:43 +0300 Subject: [PATCH] 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. --- pkg/core/blockchain.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/core/blockchain.go b/pkg/core/blockchain.go index 17fb7b3db..d47c618bb 100644 --- a/pkg/core/blockchain.go +++ b/pkg/core/blockchain.go @@ -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) }