Changeset View
Changeset View
Standalone View
Standalone View
src/test/multisig_tests.cpp
Show First 20 Lines • Show All 223 Lines • ▼ Show 20 Lines | |||||
BOOST_AUTO_TEST_CASE(multisig_Sign) { | BOOST_AUTO_TEST_CASE(multisig_Sign) { | ||||
// Test SignSignature() (and therefore the version of Solver() that signs | // Test SignSignature() (and therefore the version of Solver() that signs | ||||
// transactions) | // transactions) | ||||
FillableSigningProvider keystore; | FillableSigningProvider keystore; | ||||
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); | ||||
keystore.AddKey(key[i]); | BOOST_CHECK(keystore.AddKey(key[i])); | ||||
} | } | ||||
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; | ||||
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 All 32 Lines |