MarcoFalke b9cf505bdf
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
2021-10-25 13:28:38 +02:00
..
2021-09-10 11:18:58 +08:00
2021-10-16 13:35:57 -07:00
2021-09-29 14:10:29 +02:00
2021-07-30 11:21:51 +02:00
2021-03-17 17:59:22 -07:00
2021-09-16 21:16:39 +09:00
2021-10-11 21:45:49 +10:00
2021-10-05 11:11:18 +02:00
2021-10-07 13:22:02 +02:00
2021-09-11 10:47:02 +03:00
2021-04-06 14:50:17 +08:00
2021-08-23 21:38:34 -04:00
2021-09-29 18:46:30 +02:00
2021-08-20 16:59:41 +02:00