diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2018-06-13 21:19:06 +0200 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2018-07-12 20:32:07 +0100 |
commit | 4704e5f074e57782d058404a594a7313cf170cf0 (patch) | |
tree | 20807d03702e8367a4eb877651c3ec684df4024b /src | |
parent | c7b8f343e99d9d53ea353ddce9a977f1886caf30 (diff) |
[QA] add createwallet disableprivatekey test
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/test/wallet_tests.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp index 03754154fc..62e01cba35 100644 --- a/src/wallet/test/wallet_tests.cpp +++ b/src/wallet/test/wallet_tests.cpp @@ -363,4 +363,13 @@ BOOST_FIXTURE_TEST_CASE(ListCoins, ListCoinsTestingSetup) BOOST_CHECK_EQUAL(list.begin()->second.size(), 2U); } +BOOST_FIXTURE_TEST_CASE(wallet_disableprivkeys, TestChain100Setup) +{ + std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>("dummy", WalletDatabase::CreateDummy()); + wallet->SetWalletFlag(WALLET_FLAG_DISABLE_PRIVATE_KEYS); + BOOST_CHECK(!wallet->TopUpKeyPool(1000)); + CPubKey pubkey; + BOOST_CHECK(!wallet->GetKeyFromPool(pubkey, false)); +} + BOOST_AUTO_TEST_SUITE_END() |