Changeset View
Changeset View
Standalone View
Standalone View
src/test/script_p2sh_tests.cpp
- This file was moved from src/test/script_P2SH_tests.cpp.
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | static bool Verify(const CScript &scriptSig, const CScript &scriptPubKey, | ||||
return VerifyScript( | return VerifyScript( | ||||
scriptSig, scriptPubKey, | scriptSig, scriptPubKey, | ||||
(fStrict ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE) | | (fStrict ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE) | | ||||
SCRIPT_ENABLE_SIGHASH_FORKID, | SCRIPT_ENABLE_SIGHASH_FORKID, | ||||
MutableTransactionSignatureChecker(&txTo, 0, txFrom.vout[0].nValue), | MutableTransactionSignatureChecker(&txTo, 0, txFrom.vout[0].nValue), | ||||
&err); | &err); | ||||
} | } | ||||
BOOST_FIXTURE_TEST_SUITE(script_P2SH_tests, BasicTestingSetup) | BOOST_FIXTURE_TEST_SUITE(script_p2sh_tests, BasicTestingSetup) | ||||
BOOST_AUTO_TEST_CASE(sign) { | BOOST_AUTO_TEST_CASE(sign) { | ||||
LOCK(cs_main); | LOCK(cs_main); | ||||
// Pay-to-script-hash looks like this: | // Pay-to-script-hash looks like this: | ||||
// scriptSig: <sig> <sig...> <serialized_script> | // scriptSig: <sig> <sig...> <serialized_script> | ||||
// scriptPubKey: HASH160 <hash> EQUAL | // scriptPubKey: HASH160 <hash> EQUAL | ||||
// Test SignSignature() (and therefore the version of Solver() that signs | // Test SignSignature() (and therefore the version of Solver() that signs | ||||
▲ Show 20 Lines • Show All 406 Lines • Show Last 20 Lines |