Skip to content

Commit 0d56f11

Browse files
committedFeb 20, 2012
Fix tests after 38067c1
1 parent f7b8f82 commit 0d56f11

5 files changed

+16
-16
lines changed
 

‎src/test/multisig_tests.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ BOOST_AUTO_TEST_CASE(multisig_verify)
4646
{
4747
CKey key[4];
4848
for (int i = 0; i < 4; i++)
49-
key[i].MakeNewKey();
49+
key[i].MakeNewKey(true);
5050

5151
CScript a_and_b;
5252
a_and_b << OP_2 << key[0].GetPubKey() << key[1].GetPubKey() << OP_2 << OP_CHECKMULTISIG;
@@ -131,7 +131,7 @@ BOOST_AUTO_TEST_CASE(multisig_IsStandard)
131131
{
132132
CKey key[4];
133133
for (int i = 0; i < 4; i++)
134-
key[i].MakeNewKey();
134+
key[i].MakeNewKey(true);
135135

136136
CScript a_and_b;
137137
a_and_b << OP_2 << key[0].GetPubKey() << key[1].GetPubKey() << OP_2 << OP_CHECKMULTISIG;
@@ -178,7 +178,7 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
178178
CBitcoinAddress keyaddr[3];
179179
for (int i = 0; i < 3; i++)
180180
{
181-
key[i].MakeNewKey();
181+
key[i].MakeNewKey(true);
182182
keystore.AddKey(key[i]);
183183
keyaddr[i].SetPubKey(key[i].GetPubKey());
184184
}
@@ -257,7 +257,7 @@ BOOST_AUTO_TEST_CASE(multisig_Sign)
257257
CKey key[4];
258258
for (int i = 0; i < 4; i++)
259259
{
260-
key[i].MakeNewKey();
260+
key[i].MakeNewKey(true);
261261
keystore.AddKey(key[i]);
262262
}
263263

‎src/test/script_P2SH_tests.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ BOOST_AUTO_TEST_CASE(sign)
5757
CKey key[4];
5858
for (int i = 0; i < 4; i++)
5959
{
60-
key[i].MakeNewKey();
60+
key[i].MakeNewKey(true);
6161
keystore.AddKey(key[i]);
6262
}
6363

@@ -148,7 +148,7 @@ BOOST_AUTO_TEST_CASE(set)
148148
std::vector<CKey> keys;
149149
for (int i = 0; i < 4; i++)
150150
{
151-
key[i].MakeNewKey();
151+
key[i].MakeNewKey(true);
152152
keystore.AddKey(key[i]);
153153
keys.push_back(key[i]);
154154
}
@@ -249,7 +249,7 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
249249
vector<CKey> keys;
250250
for (int i = 0; i < 3; i++)
251251
{
252-
key[i].MakeNewKey();
252+
key[i].MakeNewKey(true);
253253
keystore.AddKey(key[i]);
254254
keys.push_back(key[i]);
255255
}

‎src/test/script_tests.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ sign_multisig(CScript scriptPubKey, CKey key, CTransaction transaction)
7272
BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG12)
7373
{
7474
CKey key1, key2, key3;
75-
key1.MakeNewKey();
76-
key2.MakeNewKey();
77-
key3.MakeNewKey();
75+
key1.MakeNewKey(true);
76+
key2.MakeNewKey(false);
77+
key3.MakeNewKey(true);
7878

7979
CScript scriptPubKey12;
8080
scriptPubKey12 << OP_1 << key1.GetPubKey() << key2.GetPubKey() << OP_2 << OP_CHECKMULTISIG;
@@ -105,10 +105,10 @@ BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG12)
105105
BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG23)
106106
{
107107
CKey key1, key2, key3, key4;
108-
key1.MakeNewKey();
109-
key2.MakeNewKey();
110-
key3.MakeNewKey();
111-
key4.MakeNewKey();
108+
key1.MakeNewKey(true);
109+
key2.MakeNewKey(false);
110+
key3.MakeNewKey(true);
111+
key4.MakeNewKey(false);
112112

113113
CScript scriptPubKey23;
114114
scriptPubKey23 << OP_2 << key1.GetPubKey() << key2.GetPubKey() << key3.GetPubKey() << OP_3 << OP_CHECKMULTISIG;

‎src/test/sigopcount_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ BOOST_AUTO_TEST_CASE(GetSigOpCount)
4141
for (int i = 0; i < 3; i++)
4242
{
4343
CKey k;
44-
k.MakeNewKey();
44+
k.MakeNewKey(true);
4545
keys.push_back(k);
4646
}
4747
CScript s2;

‎src/test/transaction_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ SetupDummyInputs(CBasicKeyStore& keystoreRet, MapPrevTx& inputsRet)
3838
CKey key[4];
3939
for (int i = 0; i < 4; i++)
4040
{
41-
key[i].MakeNewKey();
41+
key[i].MakeNewKey(i % 2);
4242
keystoreRet.AddKey(key[i]);
4343
}
4444

0 commit comments

Comments
 (0)
Please sign in to comment.