From 2911b357124eac1e16aa5fa60167457f0bbd2411 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 15 Dec 2016 23:31:54 -0800 Subject: [PATCH] Fix bug where test was generating but not saving keys to wallet on disk. --- src/gtest/test_foundersreward.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gtest/test_foundersreward.cpp b/src/gtest/test_foundersreward.cpp index b7515f55d..c6f67e3de 100644 --- a/src/gtest/test_foundersreward.cpp +++ b/src/gtest/test_foundersreward.cpp @@ -43,13 +43,22 @@ TEST(founders_reward_test, create_testnet_2of3multisig) { for (int i = 0; i < numKeys; i++) { ASSERT_TRUE(pWallet->GetKeyFromPool(newKey)); pubkeys[0] = newKey; + pWallet->SetAddressBook(newKey.GetID(), "", "receive"); + ASSERT_TRUE(pWallet->GetKeyFromPool(newKey)); pubkeys[1] = newKey; + pWallet->SetAddressBook(newKey.GetID(), "", "receive"); + ASSERT_TRUE(pWallet->GetKeyFromPool(newKey)); pubkeys[2] = newKey; + pWallet->SetAddressBook(newKey.GetID(), "", "receive"); + CScript result = GetScriptForMultisig(2, pubkeys); ASSERT_FALSE(result.size() > MAX_SCRIPT_ELEMENT_SIZE); CScriptID innerID(result); + pWallet->AddCScript(result); + pWallet->SetAddressBook(innerID, "", "receive"); + std::string address = CBitcoinAddress(innerID).ToString(); addresses.push_back(address); }