@ -428,15 +428,24 @@ BOOST_AUTO_TEST_CASE(script_build)
@@ -428,15 +428,24 @@ BOOST_AUTO_TEST_CASE(script_build)
bad . push_back ( TestBuilder ( CScript ( ) < < ToByteVector ( keys . pubkey0H ) < < OP_CHECKSIG < < OP_NOT ,
" P2PK NOT with hybrid pubkey but no STRICTENC " , 0
) . PushSig ( keys . key0 , SIGHASH_ALL ) ) ;
goo d. push_back ( TestBuilder ( CScript ( ) < < ToByteVector ( keys . pubkey0H ) < < OP_CHECKSIG < < OP_NOT ,
" P2PK NOT with hybrid pubkey " , SCRIPT_VERIFY_STRICTENC
) . PushSig ( keys . key0 , SIGHASH_ALL ) ) ;
ba d. push_back ( TestBuilder ( CScript ( ) < < ToByteVector ( keys . pubkey0H ) < < OP_CHECKSIG < < OP_NOT ,
" P2PK NOT with hybrid pubkey " , SCRIPT_VERIFY_STRICTENC
) . PushSig ( keys . key0 , SIGHASH_ALL ) ) ;
good . push_back ( TestBuilder ( CScript ( ) < < ToByteVector ( keys . pubkey0H ) < < OP_CHECKSIG < < OP_NOT ,
" P2PK NOT with invalid hybrid pubkey but no STRICTENC " , 0
) . PushSig ( keys . key0 , SIGHASH_ALL ) . DamagePush ( 10 ) ) ;
good . push_back ( TestBuilder ( CScript ( ) < < ToByteVector ( keys . pubkey0H ) < < OP_CHECKSIG < < OP_NOT ,
" P2PK NOT with invalid hybrid pubkey " , SCRIPT_VERIFY_STRICTENC
) . PushSig ( keys . key0 , SIGHASH_ALL ) . DamagePush ( 10 ) ) ;
bad . push_back ( TestBuilder ( CScript ( ) < < ToByteVector ( keys . pubkey0H ) < < OP_CHECKSIG < < OP_NOT ,
" P2PK NOT with invalid hybrid pubkey " , SCRIPT_VERIFY_STRICTENC
) . PushSig ( keys . key0 , SIGHASH_ALL ) . DamagePush ( 10 ) ) ;
good . push_back ( TestBuilder ( CScript ( ) < < OP_1 < < ToByteVector ( keys . pubkey0H ) < < ToByteVector ( keys . pubkey1C ) < < OP_2 < < OP_CHECKMULTISIG ,
" 1-of-2 with the second 1 hybrid pubkey and no STRICTENC " , 0
) . Num ( 0 ) . PushSig ( keys . key1 , SIGHASH_ALL ) ) ;
good . push_back ( TestBuilder ( CScript ( ) < < OP_1 < < ToByteVector ( keys . pubkey0H ) < < ToByteVector ( keys . pubkey1C ) < < OP_2 < < OP_CHECKMULTISIG ,
" 1-of-2 with the second 1 hybrid pubkey " , SCRIPT_VERIFY_STRICTENC
) . Num ( 0 ) . PushSig ( keys . key1 , SIGHASH_ALL ) ) ;
bad . push_back ( TestBuilder ( CScript ( ) < < OP_1 < < ToByteVector ( keys . pubkey1C ) < < ToByteVector ( keys . pubkey0H ) < < OP_2 < < OP_CHECKMULTISIG ,
" 1-of-2 with the first 1 hybrid pubkey " , SCRIPT_VERIFY_STRICTENC
) . Num ( 0 ) . PushSig ( keys . key1 , SIGHASH_ALL ) ) ;
good . push_back ( TestBuilder ( CScript ( ) < < ToByteVector ( keys . pubkey1 ) < < OP_CHECKSIG ,
" P2PK with undefined hashtype but no STRICTENC " , 0