diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2017-09-19 17:13:46 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2018-02-19 18:55:21 -0800 |
commit | ebfe217b15d21656a173e5c102f826d17c6c8be4 (patch) | |
tree | 4a461f0b2f02f96935d87faef0fcd7c10feeb415 /src/test/bip32_tests.cpp | |
parent | 32e69fa0df8fc1cfc8ac4f8381bc54b8f33e1c38 (diff) |
Stop using CBase58Data for ext keys
Diffstat (limited to 'src/test/bip32_tests.cpp')
-rw-r--r-- | src/test/bip32_tests.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/test/bip32_tests.cpp b/src/test/bip32_tests.cpp index 438ddc177d..d4c29b2635 100644 --- a/src/test/bip32_tests.cpp +++ b/src/test/bip32_tests.cpp @@ -99,20 +99,12 @@ void RunTest(const TestVector &test) { pubkey.Encode(data); // Test private key - CBitcoinExtKey b58key; b58key.SetKey(key); - BOOST_CHECK(b58key.ToString() == derive.prv); - - CBitcoinExtKey b58keyDecodeCheck(derive.prv); - CExtKey checkKey = b58keyDecodeCheck.GetKey(); - assert(checkKey == key); //ensure a base58 decoded key also matches + BOOST_CHECK(EncodeExtKey(key) == derive.prv); + BOOST_CHECK(DecodeExtKey(derive.prv) == key); //ensure a base58 decoded key also matches // Test public key - CBitcoinExtPubKey b58pubkey; b58pubkey.SetKey(pubkey); - BOOST_CHECK(b58pubkey.ToString() == derive.pub); - - CBitcoinExtPubKey b58PubkeyDecodeCheck(derive.pub); - CExtPubKey checkPubKey = b58PubkeyDecodeCheck.GetKey(); - assert(checkPubKey == pubkey); //ensure a base58 decoded pubkey also matches + BOOST_CHECK(EncodeExtPubKey(pubkey) == derive.pub); + BOOST_CHECK(DecodeExtPubKey(derive.pub) == pubkey); //ensure a base58 decoded pubkey also matches // Derive new keys CExtKey keyNew; |