mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge 265250687b into merged_master (Bitcoin PR bitcoin/bitcoin#28455)
This commit is contained in:
commit
e2aa52246d
16 changed files with 63 additions and 100 deletions
|
|
@ -1093,10 +1093,9 @@ sign_multisig(const CScript& scriptPubKey, const CKey& key, const CTransaction&
|
|||
BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG12)
|
||||
{
|
||||
ScriptError err;
|
||||
CKey key1, key2, key3;
|
||||
key1.MakeNewKey(true);
|
||||
key2.MakeNewKey(false);
|
||||
key3.MakeNewKey(true);
|
||||
CKey key1 = GenerateRandomKey();
|
||||
CKey key2 = GenerateRandomKey(/*compressed=*/false);
|
||||
CKey key3 = GenerateRandomKey();
|
||||
|
||||
CScript scriptPubKey12;
|
||||
scriptPubKey12 << OP_1 << ToByteVector(key1.GetPubKey()) << ToByteVector(key2.GetPubKey()) << OP_2 << OP_CHECKMULTISIG;
|
||||
|
|
@ -1123,11 +1122,10 @@ BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG12)
|
|||
BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG23)
|
||||
{
|
||||
ScriptError err;
|
||||
CKey key1, key2, key3, key4;
|
||||
key1.MakeNewKey(true);
|
||||
key2.MakeNewKey(false);
|
||||
key3.MakeNewKey(true);
|
||||
key4.MakeNewKey(false);
|
||||
CKey key1 = GenerateRandomKey();
|
||||
CKey key2 = GenerateRandomKey(/*compressed=*/false);
|
||||
CKey key3 = GenerateRandomKey();
|
||||
CKey key4 = GenerateRandomKey(/*compressed=*/false);
|
||||
|
||||
CScript scriptPubKey23;
|
||||
scriptPubKey23 << OP_2 << ToByteVector(key1.GetPubKey()) << ToByteVector(key2.GetPubKey()) << ToByteVector(key3.GetPubKey()) << OP_3 << OP_CHECKMULTISIG;
|
||||
|
|
@ -1207,8 +1205,7 @@ BOOST_AUTO_TEST_CASE(script_combineSigs)
|
|||
std::vector<CPubKey> pubkeys;
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
CKey key;
|
||||
key.MakeNewKey(i%2 == 1);
|
||||
CKey key = GenerateRandomKey(/*compressed=*/i%2 == 1);
|
||||
keys.push_back(key);
|
||||
pubkeys.push_back(key.GetPubKey());
|
||||
BOOST_CHECK(keystore.AddKey(key));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue