aboutsummaryrefslogtreecommitdiff
path: root/src/test/multisig_tests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/multisig_tests.cpp')
-rw-r--r--src/test/multisig_tests.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/test/multisig_tests.cpp b/src/test/multisig_tests.cpp
index 8ae9290fcc..9cb0efecfd 100644
--- a/src/test/multisig_tests.cpp
+++ b/src/test/multisig_tests.cpp
@@ -175,12 +175,12 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
//
CBasicKeyStore keystore, emptykeystore, partialkeystore;
CKey key[3];
- CBitcoinAddress keyaddr[3];
+ CTxDestination keyaddr[3];
for (int i = 0; i < 3; i++)
{
key[i].MakeNewKey(true);
keystore.AddKey(key[i]);
- keyaddr[i].SetPubKey(key[i].GetPubKey());
+ keyaddr[i] = key[i].GetPubKey().GetID();
}
partialkeystore.AddKey(key[0]);
@@ -191,8 +191,8 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
s << key[0].GetPubKey() << OP_CHECKSIG;
BOOST_CHECK(Solver(s, whichType, solutions));
BOOST_CHECK(solutions.size() == 1);
- CBitcoinAddress addr;
- BOOST_CHECK(ExtractAddress(s, addr));
+ CTxDestination addr;
+ BOOST_CHECK(ExtractDestination(s, addr));
BOOST_CHECK(addr == keyaddr[0]);
BOOST_CHECK(IsMine(keystore, s));
BOOST_CHECK(!IsMine(emptykeystore, s));
@@ -201,11 +201,11 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
vector<valtype> solutions;
txnouttype whichType;
CScript s;
- s << OP_DUP << OP_HASH160 << Hash160(key[0].GetPubKey()) << OP_EQUALVERIFY << OP_CHECKSIG;
+ s << OP_DUP << OP_HASH160 << key[0].GetPubKey().GetID() << OP_EQUALVERIFY << OP_CHECKSIG;
BOOST_CHECK(Solver(s, whichType, solutions));
BOOST_CHECK(solutions.size() == 1);
- CBitcoinAddress addr;
- BOOST_CHECK(ExtractAddress(s, addr));
+ CTxDestination addr;
+ BOOST_CHECK(ExtractDestination(s, addr));
BOOST_CHECK(addr == keyaddr[0]);
BOOST_CHECK(IsMine(keystore, s));
BOOST_CHECK(!IsMine(emptykeystore, s));
@@ -217,8 +217,8 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
s << OP_2 << key[0].GetPubKey() << key[1].GetPubKey() << OP_2 << OP_CHECKMULTISIG;
BOOST_CHECK(Solver(s, whichType, solutions));
BOOST_CHECK_EQUAL(solutions.size(), 4);
- CBitcoinAddress addr;
- BOOST_CHECK(!ExtractAddress(s, addr));
+ CTxDestination addr;
+ BOOST_CHECK(!ExtractDestination(s, addr));
BOOST_CHECK(IsMine(keystore, s));
BOOST_CHECK(!IsMine(emptykeystore, s));
BOOST_CHECK(!IsMine(partialkeystore, s));
@@ -230,9 +230,9 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
s << OP_1 << key[0].GetPubKey() << key[1].GetPubKey() << OP_2 << OP_CHECKMULTISIG;
BOOST_CHECK(Solver(s, whichType, solutions));
BOOST_CHECK_EQUAL(solutions.size(), 4);
- vector<CBitcoinAddress> addrs;
+ vector<CTxDestination> addrs;
int nRequired;
- BOOST_CHECK(ExtractAddresses(s, whichType, addrs, nRequired));
+ BOOST_CHECK(ExtractDestinations(s, whichType, addrs, nRequired));
BOOST_CHECK(addrs[0] == keyaddr[0]);
BOOST_CHECK(addrs[1] == keyaddr[1]);
BOOST_CHECK(nRequired = 1);