@@ -140,10 +140,9 @@ static CScript PushAll(const std::vector<valtype>& values)
140
140
141
141
bool ProduceSignature (const BaseSignatureCreator& creator, const CScript& fromPubKey, SignatureData& sigdata)
142
142
{
143
- CScript script = fromPubKey;
144
143
std::vector<valtype> result;
145
144
txnouttype whichType;
146
- bool solved = SignStep (creator, script , result, whichType, SIGVERSION_BASE);
145
+ bool solved = SignStep (creator, fromPubKey , result, whichType, SIGVERSION_BASE);
147
146
bool P2SH = false ;
148
147
CScript subscript;
149
148
sigdata.scriptWitness .stack .clear ();
@@ -153,8 +152,8 @@ bool ProduceSignature(const BaseSignatureCreator& creator, const CScript& fromPu
153
152
// Solver returns the subscript that needs to be evaluated;
154
153
// the final scriptSig is the signatures from that
155
154
// and then the serialized subscript:
156
- script = subscript = CScript (result[0 ].begin (), result[0 ].end ());
157
- solved = solved && SignStep (creator, script , result, whichType, SIGVERSION_BASE) && whichType != TX_SCRIPTHASH;
155
+ subscript = CScript (result[0 ].begin (), result[0 ].end ());
156
+ solved = solved && SignStep (creator, subscript , result, whichType, SIGVERSION_BASE) && whichType != TX_SCRIPTHASH;
158
157
P2SH = true ;
159
158
}
160
159
0 commit comments