@ -489,6 +489,22 @@ BOOST_AUTO_TEST_CASE(script_build)
" 2-of-2 with two identical keys and sigs pushed " , SCRIPT_VERIFY_SIGPUSHONLY
" 2-of-2 with two identical keys and sigs pushed " , SCRIPT_VERIFY_SIGPUSHONLY
) . Num ( 0 ) . PushSig ( keys . key1 ) . PushSig ( keys . key1 ) ) ;
) . Num ( 0 ) . PushSig ( keys . key1 ) . PushSig ( keys . key1 ) ) ;
good . push_back ( TestBuilder ( CScript ( ) < < ToByteVector ( keys . pubkey0 ) < < OP_CHECKSIG ,
" P2PK with unnecessary input but no CLEANSTACK " , SCRIPT_VERIFY_P2SH
) . Num ( 11 ) . PushSig ( keys . key0 ) ) ;
bad . push_back ( TestBuilder ( CScript ( ) < < ToByteVector ( keys . pubkey0 ) < < OP_CHECKSIG ,
" P2PK with unnecessary input " , SCRIPT_VERIFY_CLEANSTACK | SCRIPT_VERIFY_P2SH
) . Num ( 11 ) . PushSig ( keys . key0 ) ) ;
good . push_back ( TestBuilder ( CScript ( ) < < ToByteVector ( keys . pubkey0 ) < < OP_CHECKSIG ,
" P2SH with unnecessary input but no CLEANSTACK " , SCRIPT_VERIFY_P2SH , true
) . Num ( 11 ) . PushSig ( keys . key0 ) . PushRedeem ( ) ) ;
bad . push_back ( TestBuilder ( CScript ( ) < < ToByteVector ( keys . pubkey0 ) < < OP_CHECKSIG ,
" P2SH with unnecessary input " , SCRIPT_VERIFY_CLEANSTACK | SCRIPT_VERIFY_P2SH , true
) . Num ( 11 ) . PushSig ( keys . key0 ) . PushRedeem ( ) ) ;
good . push_back ( TestBuilder ( CScript ( ) < < ToByteVector ( keys . pubkey0 ) < < OP_CHECKSIG ,
" P2SH with CLEANSTACK " , SCRIPT_VERIFY_CLEANSTACK | SCRIPT_VERIFY_P2SH , true
) . PushSig ( keys . key0 ) . PushRedeem ( ) ) ;
std : : map < std : : string , Array > tests_good ;
std : : map < std : : string , Array > tests_good ;
std : : map < std : : string , Array > tests_bad ;
std : : map < std : : string , Array > tests_bad ;