aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorcoderrr <coderrr.contact@gmail.com>2012-01-02 14:27:41 +0700
committercoderrr <coderrr.contact@gmail.com>2012-01-03 06:24:52 +0700
commit6ec76ca09efca03236a67db65cbfe44d7c7a878e (patch)
treea7588c2d89de58240713aa72751cffa422455f87 /src/test
parent625b56de6491170ad6a2e45c57d974fca6160750 (diff)
make sure IsMine only returns true when we own all keys
Diffstat (limited to 'src/test')
-rw-r--r--src/test/multisig_tests.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/multisig_tests.cpp b/src/test/multisig_tests.cpp
index 742083f3cf..0c2e41aedd 100644
--- a/src/test/multisig_tests.cpp
+++ b/src/test/multisig_tests.cpp
@@ -174,7 +174,7 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
// one key that would satisfy an (a|b) or 2-of-3 keys needed
// to spend an escrow transaction.
//
- CBasicKeyStore keystore, emptykeystore;
+ CBasicKeyStore keystore, emptykeystore, partialkeystore;
CKey key[3];
CBitcoinAddress keyaddr[3];
for (int i = 0; i < 3; i++)
@@ -183,6 +183,7 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
keystore.AddKey(key[i]);
keyaddr[i].SetPubKey(key[i].GetPubKey());
}
+ partialkeystore.AddKey(key[0]);
{
vector<valtype> solutions;
@@ -221,6 +222,7 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
BOOST_CHECK(!ExtractAddress(s, addr));
BOOST_CHECK(IsMine(keystore, s));
BOOST_CHECK(!IsMine(emptykeystore, s));
+ BOOST_CHECK(!IsMine(partialkeystore, s));
}
{
vector<valtype> solutions;
@@ -237,6 +239,7 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
BOOST_CHECK(nRequired = 1);
BOOST_CHECK(IsMine(keystore, s));
BOOST_CHECK(!IsMine(emptykeystore, s));
+ BOOST_CHECK(!IsMine(partialkeystore, s));
}
{
vector<valtype> solutions;