Browse Source

Revert "wallet: Comment out HDSeed and CHDChain persistence to disk"

This reverts commit b7f9a7ae02.
pull/4/head
mdr0id 6 years ago
committed by Jack Grigg
parent
commit
87ae893d75
No known key found for this signature in database GPG Key ID: 1B8D649257DB0829
  1. 4
      qa/pull-tester/rpc-tests.sh
  2. 2
      src/test/rpc_wallet_tests.cpp
  3. 2
      src/wallet/gtest/test_wallet_zkeys.cpp
  4. 6
      src/wallet/wallet.cpp

4
qa/pull-tester/rpc-tests.sh

@ -23,7 +23,7 @@ testScripts=(
'wallet_mergetoaddress.py'
'wallet.py'
'wallet_overwintertx.py'
# 'wallet_nullifiers.py'
'wallet_nullifiers.py'
'wallet_1941.py'
'wallet_addresses.py'
'wallet_sapling.py'
@ -44,7 +44,7 @@ testScripts=(
'zapwallettxes.py'
'proxy_test.py'
'merkle_blocks.py'
# 'fundrawtransaction.py'
'fundrawtransaction.py'
'signrawtransactions.py'
'signrawtransaction_offline.py'
'walletbackup.py'

2
src/test/rpc_wallet_tests.cpp

@ -1356,7 +1356,6 @@ BOOST_AUTO_TEST_CASE(rpc_z_sendmany_taddr_to_sapling)
/*
* This test covers storing encrypted zkeys in the wallet.
*/
/* TODO: Uncomment during PR for #3388
BOOST_AUTO_TEST_CASE(rpc_wallet_encrypted_wallet_zkeys)
{
LOCK2(cs_main, pwalletMain->cs_wallet);
@ -1412,7 +1411,6 @@ BOOST_AUTO_TEST_CASE(rpc_wallet_encrypted_wallet_zkeys)
// We can't simulate over RPC the wallet closing and being reloaded
// but there are tests for this in gtest.
}
*/
BOOST_AUTO_TEST_CASE(rpc_z_listunspent_parameters)

2
src/wallet/gtest/test_wallet_zkeys.cpp

@ -288,7 +288,6 @@ TEST(wallet_zkeys_tests, WriteViewingKeyDirectToDB) {
/**
* This test covers methods on CWalletDB to load/save crypted z keys.
*/
/* TODO: Uncomment during PR for #3388
TEST(wallet_zkeys_tests, write_cryptedzkey_direct_to_db) {
SelectParams(CBaseChainParams::TESTNET);
@ -363,5 +362,4 @@ TEST(wallet_zkeys_tests, write_cryptedzkey_direct_to_db) {
wallet2.GetSproutSpendingKey(paymentAddress2, keyOut);
ASSERT_EQ(paymentAddress2, keyOut.address());
}
*/

6
src/wallet/wallet.cpp

@ -1991,14 +1991,12 @@ bool CWallet::SetHDSeed(const HDSeed& seed)
return true;
}
/* TODO: Uncomment during PR for #3388
{
LOCK(cs_wallet);
if (!IsCrypted()) {
return CWalletDB(strWalletFile).WriteHDSeed(seed);
}
}
*/
return true;
}
@ -2012,7 +2010,6 @@ bool CWallet::SetCryptedHDSeed(const uint256& seedFp, const std::vector<unsigned
return true;
}
/* TODO: Uncomment during PR for #3388
{
LOCK(cs_wallet);
if (pwalletdbEncryption)
@ -2020,17 +2017,14 @@ bool CWallet::SetCryptedHDSeed(const uint256& seedFp, const std::vector<unsigned
else
return CWalletDB(strWalletFile).WriteCryptedHDSeed(seedFp, vchCryptedSecret);
}
*/
return false;
}
void CWallet::SetHDChain(const CHDChain& chain, bool memonly)
{
LOCK(cs_wallet);
/* TODO: Uncomment during PR for #3388
if (!memonly && fFileBacked && !CWalletDB(strWalletFile).WriteHDChain(chain))
throw std::runtime_error(std::string(__func__) + ": writing chain failed");
*/
hdChain = chain;
}

Loading…
Cancel
Save