GenerateNewSproutZKey can return a SproutPaymentAddress

This commit is contained in:
Eirik Ogilvie-Wigley
2018-10-08 14:52:58 -06:00
parent 92fc29a3f4
commit d6ad8cef2c
4 changed files with 10 additions and 18 deletions

View File

@@ -404,10 +404,8 @@ BOOST_AUTO_TEST_CASE(rpc_wallet_z_exportwallet)
BOOST_CHECK(addrs.size()==0);
// wallet should have one key
auto address = pwalletMain->GenerateNewSproutZKey();
BOOST_CHECK(IsValidPaymentAddress(address));
BOOST_ASSERT(boost::get<libzcash::SproutPaymentAddress>(&address) != nullptr);
auto addr = boost::get<libzcash::SproutPaymentAddress>(address);
auto addr = pwalletMain->GenerateNewSproutZKey();
BOOST_CHECK(IsValidPaymentAddress(addr));
pwalletMain->GetSproutPaymentAddresses(addrs);
BOOST_CHECK(addrs.size()==1);