Changeset View
Changeset View
Standalone View
Standalone View
src/test/multisig_tests.cpp
Show First 20 Lines • Show All 168 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
BOOST_AUTO_TEST_CASE(multisig_IsStandard) { | BOOST_AUTO_TEST_CASE(multisig_IsStandard) { | ||||
CKey key[4]; | CKey key[4]; | ||||
for (int i = 0; i < 4; i++) { | for (int i = 0; i < 4; i++) { | ||||
key[i].MakeNewKey(true); | key[i].MakeNewKey(true); | ||||
} | } | ||||
txnouttype whichType; | TxoutType whichType; | ||||
CScript a_and_b; | CScript a_and_b; | ||||
a_and_b << OP_2 << ToByteVector(key[0].GetPubKey()) | a_and_b << OP_2 << ToByteVector(key[0].GetPubKey()) | ||||
<< ToByteVector(key[1].GetPubKey()) << OP_2 << OP_CHECKMULTISIG; | << ToByteVector(key[1].GetPubKey()) << OP_2 << OP_CHECKMULTISIG; | ||||
BOOST_CHECK(::IsStandard(a_and_b, whichType)); | BOOST_CHECK(::IsStandard(a_and_b, whichType)); | ||||
CScript a_or_b; | CScript a_or_b; | ||||
a_or_b << OP_1 << ToByteVector(key[0].GetPubKey()) | a_or_b << OP_1 << ToByteVector(key[0].GetPubKey()) | ||||
▲ Show 20 Lines • Show All 87 Lines • Show Last 20 Lines |