File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -88,12 +88,23 @@ void RunTest(const TestVector &test) {
88
88
unsigned char data[74 ];
89
89
key.Encode (data);
90
90
pubkey.Encode (data);
91
+
91
92
// Test private key
92
93
CBitcoinExtKey b58key; b58key.SetKey (key);
93
94
BOOST_CHECK (b58key.ToString () == derive.prv );
95
+
96
+ CBitcoinExtKey b58keyDecodeCheck (derive.prv );
97
+ CExtKey checkKey = b58keyDecodeCheck.GetKey ();
98
+ assert (checkKey == key); // ensure a base58 decoded key also matches
99
+
94
100
// Test public key
95
101
CBitcoinExtPubKey b58pubkey; b58pubkey.SetKey (pubkey);
96
102
BOOST_CHECK (b58pubkey.ToString () == derive.pub );
103
+
104
+ CBitcoinExtPubKey b58PubkeyDecodeCheck (derive.pub );
105
+ CExtPubKey checkPubKey = b58PubkeyDecodeCheck.GetKey ();
106
+ assert (checkPubKey == pubkey); // ensure a base58 decoded pubkey also matches
107
+
97
108
// Derive new keys
98
109
CExtKey keyNew;
99
110
BOOST_CHECK (key.Derive (keyNew, derive.nChild ));
You can’t perform that action at this time.
0 commit comments