QA: Allow setting the fedpeg script with a command line argument

- In both default and regtest modes
- The script is stored
- BaseSignatureChecker is used to pass it to the interpreter

Modified by jtimon
This commit is contained in:
Jonas Nick 2016-03-22 23:06:10 +01:00 committed by Gregory Sanders
parent 51cc3a77fb
commit bb1f44f8a6
9 changed files with 26 additions and 12 deletions

View file

@ -2263,7 +2263,7 @@ void UpdateCoins(const CTransaction& tx, CCoinsViewCache& inputs, int nHeight)
bool CScriptCheck::operator()() {
const CScript &scriptSig = ptxTo->vin[nIn].scriptSig;
const CScriptWitness *witness = (nIn < ptxTo->wit.vtxinwit.size()) ? &ptxTo->wit.vtxinwit[nIn].scriptWitness : NULL;
if (!VerifyScript(scriptSig, scriptPubKey, witness, nFlags, CachingTransactionSignatureChecker(ptxTo, nIn, amount, amountPreviousInput, cacheStore, *txdata), &error)) {
if (!VerifyScript(scriptSig, scriptPubKey, witness, nFlags, CachingTransactionSignatureChecker(ptxTo, nIn, amount, amountPreviousInput, Params().GetConsensus().fedpegScript, cacheStore, *txdata), &error)) {
return false;
}
return true;