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 4ad6b57068
commit 1287eaa0d9
9 changed files with 26 additions and 12 deletions

View file

@ -1691,7 +1691,7 @@ void UpdateCoins(const CTransaction& tx, CCoinsViewCache& inputs, int nHeight)
bool CScriptCheck::operator()() {
const CScript &scriptSig = ptxTo->vin[nIn].scriptSig;
const CScriptWitness *witness = &ptxTo->vin[nIn].scriptWitness;
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;