Introduce script verification flags
These flags select features to be enabled/disabled during script evaluation/checking, instead of several booleans passed along. Currently these flags are defined: * SCRIPT_VERIFY_P2SH: enable BIP16-style subscript evaluation * SCRIPT_VERIFY_STRICTENC: enforce strict adherence to pubkey/sig encoding standards.
This commit is contained in:
@@ -76,7 +76,7 @@ BOOST_AUTO_TEST_CASE(tx_valid)
|
||||
break;
|
||||
}
|
||||
|
||||
BOOST_CHECK_MESSAGE(VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout], tx, i, test[2].get_bool(), false, 0), strTest);
|
||||
BOOST_CHECK_MESSAGE(VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout], tx, i, test[2].get_bool() ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE, 0), strTest);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -143,7 +143,7 @@ BOOST_AUTO_TEST_CASE(tx_invalid)
|
||||
break;
|
||||
}
|
||||
|
||||
fValid = VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout], tx, i, test[2].get_bool(), true, 0);
|
||||
fValid = VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout], tx, i, test[2].get_bool() ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE, 0);
|
||||
}
|
||||
|
||||
BOOST_CHECK_MESSAGE(!fValid, strTest);
|
||||
|
||||
Reference in New Issue
Block a user