diff options
| author | Wladimir J. van der Laan <[email protected]> | 2016-04-15 07:56:22 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2016-04-15 07:59:38 +0200 |
| commit | 48c5adfbcea2006dc55011a3d7f27e30fbe4a6b3 (patch) | |
| tree | aa97931757b0d32416152502e9cf83060c7ece2c /src/test/bip32_tests.cpp | |
| parent | Merge #7878: [test] bctest.py: Revert faa41ee (diff) | |
| parent | add bip32 pubkey serialization (diff) | |
| download | discoin-48c5adfbcea2006dc55011a3d7f27e30fbe4a6b3.tar.xz discoin-48c5adfbcea2006dc55011a3d7f27e30fbe4a6b3.zip | |
Merge #6215: add bip32 pub key serialization
90604f1 add bip32 pubkey serialization (Jonas Schnelli)
Diffstat (limited to 'src/test/bip32_tests.cpp')
| -rw-r--r-- | src/test/bip32_tests.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/bip32_tests.cpp b/src/test/bip32_tests.cpp index ce29e692d..7f1c2a32d 100644 --- a/src/test/bip32_tests.cpp +++ b/src/test/bip32_tests.cpp @@ -117,6 +117,22 @@ void RunTest(const TestVector &test) { } key = keyNew; pubkey = pubkeyNew; + + CDataStream ssPub(SER_DISK, CLIENT_VERSION); + ssPub << pubkeyNew; + BOOST_CHECK(ssPub.size() == 75); + + CDataStream ssPriv(SER_DISK, CLIENT_VERSION); + ssPriv << keyNew; + BOOST_CHECK(ssPriv.size() == 75); + + CExtPubKey pubCheck; + CExtKey privCheck; + ssPub >> pubCheck; + ssPriv >> privCheck; + + BOOST_CHECK(pubCheck == pubkeyNew); + BOOST_CHECK(privCheck == keyNew); } } |