diff options
author | Roy Badami <roy@gnomon.org.uk> | 2014-07-07 22:06:21 +0100 |
---|---|---|
committer | Roy Badami <roy@gnomon.org.uk> | 2014-07-07 22:06:21 +0100 |
commit | 96df327834af3b55918adfac9b3f65adfc960b3a (patch) | |
tree | 8bd199df46ea6f39f7094c0e7db2185b4d3f5d6d /src/test/base58_tests.cpp | |
parent | 2e4fee2ac4824570c1340a8f8fe2aed4580de879 (diff) | |
parent | 1fedd65fcf9ac04b70f0fa8cf6caa9629857d586 (diff) |
Merge remote-tracking branch 'upstream/master'
Conflicts:
src/qt/overviewpage.cpp
src/qt/transactiondesc.cpp
Diffstat (limited to 'src/test/base58_tests.cpp')
-rw-r--r-- | src/test/base58_tests.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/test/base58_tests.cpp b/src/test/base58_tests.cpp index 5689e69995..0ac3e9a363 100644 --- a/src/test/base58_tests.cpp +++ b/src/test/base58_tests.cpp @@ -142,9 +142,9 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_parse) bool isPrivkey = find_value(metadata, "isPrivkey").get_bool(); bool isTestnet = find_value(metadata, "isTestnet").get_bool(); if (isTestnet) - SelectParams(CChainParams::TESTNET); + SelectParams(CBaseChainParams::TESTNET); else - SelectParams(CChainParams::MAIN); + SelectParams(CBaseChainParams::MAIN); if(isPrivkey) { bool isCompressed = find_value(metadata, "isCompressed").get_bool(); @@ -175,7 +175,7 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_parse) BOOST_CHECK_MESSAGE(!secret.IsValid(), "IsValid pubkey as privkey:" + strTest); } } - SelectParams(CChainParams::MAIN); + SelectParams(CBaseChainParams::MAIN); } // Goal: check that generated keys match test vectors @@ -198,9 +198,9 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_gen) bool isPrivkey = find_value(metadata, "isPrivkey").get_bool(); bool isTestnet = find_value(metadata, "isTestnet").get_bool(); if (isTestnet) - SelectParams(CChainParams::TESTNET); + SelectParams(CBaseChainParams::TESTNET); else - SelectParams(CChainParams::MAIN); + SelectParams(CBaseChainParams::MAIN); if(isPrivkey) { bool isCompressed = find_value(metadata, "isCompressed").get_bool(); @@ -233,7 +233,7 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_gen) continue; } CBitcoinAddress addrOut; - BOOST_CHECK_MESSAGE(boost::apply_visitor(CBitcoinAddressVisitor(&addrOut), dest), "encode dest: " + strTest); + BOOST_CHECK_MESSAGE(addrOut.Set(dest), "encode dest: " + strTest); BOOST_CHECK_MESSAGE(addrOut.ToString() == exp_base58string, "mismatch: " + strTest); } } @@ -241,9 +241,9 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_gen) // Visiting a CNoDestination must fail CBitcoinAddress dummyAddr; CTxDestination nodest = CNoDestination(); - BOOST_CHECK(!boost::apply_visitor(CBitcoinAddressVisitor(&dummyAddr), nodest)); + BOOST_CHECK(!dummyAddr.Set(nodest)); - SelectParams(CChainParams::MAIN); + SelectParams(CBaseChainParams::MAIN); } // Goal: check that base58 parsing code is robust against a variety of corrupted data |