aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/test/wallet_tests.cpp
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2021-04-07 20:55:09 -0400
committerAndrew Chow <achow101-github@achow101.com>2021-04-12 19:29:03 -0400
commit41f891da508114f1fd4df30b4068073ec30abc2a (patch)
tree1b3e171dfbc7eadf4d503659e4c973dcc93c3d9d /src/wallet/test/wallet_tests.cpp
parentcb79cabdd9d9a6d183cf09575dd46925f2c9cb3b (diff)
downloadbitcoin-41f891da508114f1fd4df30b4068073ec30abc2a.tar.xz
tests: Skip SQLite fsyncs while testing
Since we want tests to run quickly, and since tests do a lot more db operations than expected we expect to see in actual usage, we disable sqlite's syncing behavior to make db operations run much faster. This syncing behavior is necessary for normal operation as it helps guarantee that data won't become lost or corrupted, but in tests, we don't care about that.
Diffstat (limited to 'src/wallet/test/wallet_tests.cpp')
-rw-r--r--src/wallet/test/wallet_tests.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp
index ba2e17d62a..c6bce20394 100644
--- a/src/wallet/test/wallet_tests.cpp
+++ b/src/wallet/test/wallet_tests.cpp
@@ -695,6 +695,7 @@ BOOST_FIXTURE_TEST_CASE(wallet_descriptor_test, BasicTestingSetup)
//! rescanning where new transactions in new blocks could be lost.
BOOST_FIXTURE_TEST_CASE(CreateWallet, TestChain100Setup)
{
+ gArgs.ForceSetArg("-unsafesqlitesync", "1");
// Create new wallet with known key and unload it.
auto wallet = TestLoadWallet(*m_node.chain);
CKey key;
@@ -790,6 +791,7 @@ BOOST_FIXTURE_TEST_CASE(CreateWallet, TestChain100Setup)
BOOST_FIXTURE_TEST_CASE(ZapSelectTx, TestChain100Setup)
{
+ gArgs.ForceSetArg("-unsafesqlitesync", "1");
auto wallet = TestLoadWallet(*m_node.chain);
CKey key;
key.MakeNewKey(true);