diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2017-12-13 15:16:23 -0500 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2017-12-13 15:16:23 -0500 |
commit | 9360f503218e780e405a1c8acaee65da8e35b4a6 (patch) | |
tree | 23d039f31d9f67497bdf791fc2f417109e3f2dea /src | |
parent | d4991c0cbb8a5464add1b64268eccdbfd3026d6e (diff) |
Drop extra script variable in ProduceSignature
Was slightly confusing.
Diffstat (limited to 'src')
-rw-r--r-- | src/script/sign.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/script/sign.cpp b/src/script/sign.cpp index 117a4d8a52..2aafaeb2c7 100644 --- a/src/script/sign.cpp +++ b/src/script/sign.cpp @@ -140,10 +140,9 @@ static CScript PushAll(const std::vector<valtype>& values) bool ProduceSignature(const BaseSignatureCreator& creator, const CScript& fromPubKey, SignatureData& sigdata) { - CScript script = fromPubKey; std::vector<valtype> result; txnouttype whichType; - bool solved = SignStep(creator, script, result, whichType, SIGVERSION_BASE); + bool solved = SignStep(creator, fromPubKey, result, whichType, SIGVERSION_BASE); bool P2SH = false; CScript subscript; sigdata.scriptWitness.stack.clear(); @@ -153,8 +152,8 @@ bool ProduceSignature(const BaseSignatureCreator& creator, const CScript& fromPu // Solver returns the subscript that needs to be evaluated; // the final scriptSig is the signatures from that // and then the serialized subscript: - script = subscript = CScript(result[0].begin(), result[0].end()); - solved = solved && SignStep(creator, script, result, whichType, SIGVERSION_BASE) && whichType != TX_SCRIPTHASH; + subscript = CScript(result[0].begin(), result[0].end()); + solved = solved && SignStep(creator, subscript, result, whichType, SIGVERSION_BASE) && whichType != TX_SCRIPTHASH; P2SH = true; } |