diff options
| author | Pieter Wuille <[email protected]> | 2015-11-08 01:16:45 +0100 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2016-06-22 15:42:59 +0200 |
| commit | 449f9b8debcceb61a92043bc7031528a53627c47 (patch) | |
| tree | c55434295cae8c338fe8ec128c325fa254303ecb /src/main.cpp | |
| parent | BIP144: Serialization, hashes, relay (sender side) (diff) | |
| download | discoin-449f9b8debcceb61a92043bc7031528a53627c47.tar.xz discoin-449f9b8debcceb61a92043bc7031528a53627c47.zip | |
BIP141: Witness program
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 218494023..d1945a509 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1867,7 +1867,8 @@ void UpdateCoins(const CTransaction& tx, CCoinsViewCache& inputs, int nHeight) bool CScriptCheck::operator()() { const CScript &scriptSig = ptxTo->vin[nIn].scriptSig; - if (!VerifyScript(scriptSig, scriptPubKey, nFlags, CachingTransactionSignatureChecker(ptxTo, nIn, cacheStore), &error)) { + const CScriptWitness *witness = (nIn < ptxTo->wit.vtxinwit.size()) ? &ptxTo->wit.vtxinwit[nIn].scriptWitness : NULL; + if (!VerifyScript(scriptSig, scriptPubKey, witness, nFlags, CachingTransactionSignatureChecker(ptxTo, nIn, cacheStore), &error)) { return false; } return true; |