Fix broken test on previous checkin

This commit is contained in:
Brannon King 2019-09-16 14:49:35 -06:00 committed by Anthony Fieroni
parent 3a1ebf8ac3
commit 83cef85cab
2 changed files with 4 additions and 3 deletions

View file

@ -165,7 +165,7 @@ bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs)
const CTxOut& prev = mapInputs.AccessCoin(tx.vin[i].prevout).out;
std::vector<std::vector<unsigned char> > vSolutions;
const CScript& prevScript = prev.scriptPubKey;
const CScript& prevScript = StripClaimScriptPrefix(prev.scriptPubKey);
txnouttype whichType = Solver(prevScript, vSolutions);
if (whichType == TX_NONSTANDARD) {
return false;

View file

@ -105,7 +105,8 @@ static bool SignStep(const SigningProvider& provider, const BaseSignatureCreator
std::vector<unsigned char> sig;
std::vector<valtype> vSolutions;
whichTypeRet = Solver(scriptPubKey, vSolutions);
auto stripped = StripClaimScriptPrefix(scriptPubKey);
whichTypeRet = Solver(stripped, vSolutions);
switch (whichTypeRet)
{
@ -195,7 +196,7 @@ bool ProduceSignature(const SigningProvider& provider, const BaseSignatureCreato
std::vector<valtype> result;
txnouttype whichType;
bool solved = SignStep(provider, creator, StripClaimScriptPrefix(fromPubKey), result, whichType, SigVersion::BASE, sigdata);
bool solved = SignStep(provider, creator, fromPubKey, result, whichType, SigVersion::BASE, sigdata);
bool P2SH = false;
CScript subscript;
sigdata.scriptWitness.stack.clear();