mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
Stop using CBase58Data for ext keys
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user