From 2a99643fb06098cced1d002e9deb7dacdcc03c9a Mon Sep 17 00:00:00 2001 From: Erik Zhang Date: Sat, 12 Sep 2020 22:24:44 +0800 Subject: [PATCH] Allow calling script hash to pass CheckWitness (#1925) --- src/neo/SmartContract/ApplicationEngine.Runtime.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/neo/SmartContract/ApplicationEngine.Runtime.cs b/src/neo/SmartContract/ApplicationEngine.Runtime.cs index 99903c35e5..935e4fb2fe 100644 --- a/src/neo/SmartContract/ApplicationEngine.Runtime.cs +++ b/src/neo/SmartContract/ApplicationEngine.Runtime.cs @@ -104,6 +104,8 @@ protected internal bool CheckWitness(byte[] hashOrPubkey) protected internal bool CheckWitnessInternal(UInt160 hash) { + if (hash.Equals(CallingScriptHash)) return true; + if (ScriptContainer is Transaction tx) { Signer[] signers;