From 88fd81015056a26601b7e98c3c0ba115833db22b Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 29 Sep 2016 23:04:27 -0700 Subject: [PATCH] Update founders reward test to output path of temporary wallet.dat file which contains keys which can be used for testing founders reward addresses. --- src/gtest/test_foundersreward.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gtest/test_foundersreward.cpp b/src/gtest/test_foundersreward.cpp index 4db0d985..2f777654 100644 --- a/src/gtest/test_foundersreward.cpp +++ b/src/gtest/test_foundersreward.cpp @@ -19,17 +19,19 @@ // // Enable this test to generate and print 48 testnet 2-of-3 multisig addresses. // The output can be copied into chainparams.cpp. +// The temporary wallet file can be renamed as wallet.dat and used for testing with zcashd. // #if 0 TEST(founders_reward_test, create_testnet_2of3multisig) { ECC_Start(); SelectParams(CBaseChainParams::TESTNET); boost::filesystem::path temp = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path(); - const std::string path = temp.native(); + const std::string path = temp.native() + "-wallet.dat"; bool fFirstRun; auto pWallet = std::make_shared(path); ASSERT_EQ(DB_LOAD_OK, pWallet->LoadWallet(fFirstRun)); pWallet->TopUpKeyPool(); + std::cout << "Test wallet file path: " << path << std::endl; int numKeys = 48; std::vector pubkeys; @@ -65,6 +67,8 @@ TEST(founders_reward_test, create_testnet_2of3multisig) { } s += " };"; std::cout << s << std::endl; + + pWallet->Flush(true); } #endif