diff options
| author | Jonas Schnelli <[email protected]> | 2013-06-03 15:18:41 +0200 |
|---|---|---|
| committer | Jonas Schnelli <[email protected]> | 2013-06-03 15:18:41 +0200 |
| commit | 39fe9de6b2b255969971beca8fa25a33ad2e5750 (patch) | |
| tree | 6686041f6b801d0ea5185b026a480a5be61510e6 /src/test/base58_tests.cpp | |
| parent | MaxOSX: settings fixes (#2371) (diff) | |
| parent | Merge pull request #2672 from Diapolo/Qt_testnet (diff) | |
| download | discoin-39fe9de6b2b255969971beca8fa25a33ad2e5750.tar.xz discoin-39fe9de6b2b255969971beca8fa25a33ad2e5750.zip | |
Merge branch 'master' of git://github.com/bitcoin/bitcoin into prefsFix
Signed-off-by: Jonas Schnelli <[email protected]>
Conflicts:
bitcoin-qt.pro
Diffstat (limited to 'src/test/base58_tests.cpp')
| -rw-r--r-- | src/test/base58_tests.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/test/base58_tests.cpp b/src/test/base58_tests.cpp index 7602fa93a..2741672a8 100644 --- a/src/test/base58_tests.cpp +++ b/src/test/base58_tests.cpp @@ -133,9 +133,8 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_parse) // Note: CBitcoinSecret::SetString tests isValid, whereas CBitcoinAddress does not! BOOST_CHECK_MESSAGE(secret.SetString(exp_base58string), "!SetString:"+ strTest); BOOST_CHECK_MESSAGE(secret.IsValid(), "!IsValid:" + strTest); - bool fCompressedOut = false; - CSecret privkey = secret.GetSecret(fCompressedOut); - BOOST_CHECK_MESSAGE(fCompressedOut == isCompressed, "compressed mismatch:" + strTest); + CKey privkey = secret.GetKey(); + BOOST_CHECK_MESSAGE(privkey.IsCompressed() == isCompressed, "compressed mismatch:" + strTest); BOOST_CHECK_MESSAGE(privkey.size() == exp_payload.size() && std::equal(privkey.begin(), privkey.end(), exp_payload.begin()), "key mismatch:" + strTest); // Private key must be invalid public key @@ -187,8 +186,11 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_gen) if(isPrivkey) { bool isCompressed = find_value(metadata, "isCompressed").get_bool(); + CKey key; + key.Set(exp_payload.begin(), exp_payload.end(), isCompressed); + assert(key.IsValid()); CBitcoinSecret secret; - secret.SetSecret(CSecret(exp_payload.begin(), exp_payload.end()), isCompressed); + secret.SetKey(key); BOOST_CHECK_MESSAGE(secret.ToString() == exp_base58string, "result mismatch: " + strTest); } else |