aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-10-25 13:28:35 +0200
committerMarcoFalke <falke.marco@gmail.com>2021-10-25 13:28:38 +0200
commitb9cf505bdfade074f3d2b0473d56d2cbc2711cb3 (patch)
treefc423ee0848431dd0fe727619588b5916565ba7e /src/net.h
parent04437ee721e66a7b76bef5ec2f88dd1efcd03b84 (diff)
parenta52f1d13409e4ef46277596ec13fa8b421fa1329 (diff)
Merge bitcoin/bitcoin#23338: tests: speed up coinselector_tests
a52f1d13409e4ef46277596ec13fa8b421fa1329 walletdb: Use SQLiteDatabase for mock wallet databases (Andrew Chow) a78c2298080f173d0266e708267458a72eb2f600 tests: Place into mapWallet in coinselector_tests (Andrew Chow) Pull request description: #23288 changed coinselector_tests to use `DescriptorScriptPubKeyMan`, but it also ended up significantly slowing down the test, from 4 seconds to over 1 minute. It appears that the source of this slow down is with `CWallet::AddToWallet`, and primarily due to writing data to the mock wallet database. Because the only thing that is actually needed is for the created transaction to be placed into `CWallet::mapWallet`, this PR removes the call to `AddToWallet` and just places the transaction into `mapWallet` directly. This reduces the test time to 5 seconds. To speed things up further, `CreateMockWalletDatabase` is changed to make a `SQLiteDatabase` instead of a `BerkeleyDatabase`. This is safe because there are no tests that require a specific mock database type. ACKs for top commit: brunoerg: tACK a52f1d13409e4ef46277596ec13fa8b421fa1329 lsilva01: tACK a52f1d1. Performed 74.36% better on Ubuntu 20.04 (VM, 12 MB, 8vCPU). glozow: utACK a52f1d13409e4ef46277596ec13fa8b421fa1329 Tree-SHA512: da77936bfd2e816d2e71703567b9389d0ee79f3a4a690802ffe3469df5bed371b296cb822b897f625654dab9436d91fd6bc02364a518a47d746e487d70a72595
Diffstat (limited to 'src/net.h')
0 files changed, 0 insertions, 0 deletions