diff options
| author | Johnson Lau <[email protected]> | 2016-10-15 23:45:07 +0800 |
|---|---|---|
| committer | Johnson Lau <[email protected]> | 2016-10-16 00:30:50 +0800 |
| commit | acf853df910339412bafb1743f42af1774f5b910 (patch) | |
| tree | 8730503b621476df15f82f30765c57f8fbaadb0c /src/script/interpreter.cpp | |
| parent | Merge #8880: protocol.h: Move MESSAGE_START_SIZE into CMessageHeader (diff) | |
| download | discoin-acf853df910339412bafb1743f42af1774f5b910.tar.xz discoin-acf853df910339412bafb1743f42af1774f5b910.zip | |
Add script tests for FindAndDelete in pre-segwit and segwit scripts
Diffstat (limited to 'src/script/interpreter.cpp')
| -rw-r--r-- | src/script/interpreter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index 41756ea71..e0f2f8919 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -874,7 +874,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un // Subset of script starting at the most recent codeseparator CScript scriptCode(pbegincodehash, pend); - // Drop the signature, since there's no way for a signature to sign itself + // Drop the signature in pre-segwit scripts but not segwit scripts if (sigversion == SIGVERSION_BASE) { scriptCode.FindAndDelete(CScript(vchSig)); } @@ -935,7 +935,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un // Subset of script starting at the most recent codeseparator CScript scriptCode(pbegincodehash, pend); - // Drop the signatures, since there's no way for a signature to sign itself + // Drop the signature in pre-segwit scripts but not segwit scripts for (int k = 0; k < nSigsCount; k++) { valtype& vchSig = stacktop(-isig-k); |