|
|
@ -428,6 +428,9 @@ BOOST_AUTO_TEST_CASE(script_build) |
|
|
|
"P2SH(P2PK), bad redeemscript", SCRIPT_VERIFY_P2SH, true |
|
|
|
"P2SH(P2PK), bad redeemscript", SCRIPT_VERIFY_P2SH, true |
|
|
|
).PushSig(keys.key0).PushRedeem().DamagePush(10).ScriptError(SCRIPT_ERR_EVAL_FALSE)); |
|
|
|
).PushSig(keys.key0).PushRedeem().DamagePush(10).ScriptError(SCRIPT_ERR_EVAL_FALSE)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests.push_back(TestBuilder(CScript() << OP_DUP << OP_HASH160 << ToByteVector(keys.pubkey0.GetID()) << OP_EQUALVERIFY << OP_CHECKSIG, |
|
|
|
|
|
|
|
"P2SH(P2PKH)", SCRIPT_VERIFY_P2SH, true |
|
|
|
|
|
|
|
).PushSig(keys.key0).Push(keys.pubkey0).PushRedeem()); |
|
|
|
tests.push_back(TestBuilder(CScript() << OP_DUP << OP_HASH160 << ToByteVector(keys.pubkey1.GetID()) << OP_EQUALVERIFY << OP_CHECKSIG, |
|
|
|
tests.push_back(TestBuilder(CScript() << OP_DUP << OP_HASH160 << ToByteVector(keys.pubkey1.GetID()) << OP_EQUALVERIFY << OP_CHECKSIG, |
|
|
|
"P2SH(P2PKH), bad sig but no VERIFY_P2SH", 0, true |
|
|
|
"P2SH(P2PKH), bad sig but no VERIFY_P2SH", 0, true |
|
|
|
).PushSig(keys.key0).DamagePush(10).PushRedeem()); |
|
|
|
).PushSig(keys.key0).DamagePush(10).PushRedeem()); |
|
|
|