0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-04 10:07:27 -05:00
bitcoin-bitcoin-core/src
MarcoFalke b9cf505bdf
Merge bitcoin/bitcoin#23338: tests: speed up coinselector_tests
a52f1d1340 walletdb: Use SQLiteDatabase for mock wallet databases (Andrew Chow)
a78c229808 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 a52f1d1340
  lsilva01:
    tACK a52f1d1. Performed 74.36% better on Ubuntu 20.04 (VM, 12 MB, 8vCPU).
  glozow:
    utACK a52f1d1340

Tree-SHA512: da77936bfd2e816d2e71703567b9389d0ee79f3a4a690802ffe3469df5bed371b296cb822b897f625654dab9436d91fd6bc02364a518a47d746e487d70a72595
2021-10-25 13:28:38 +02:00
..
bench Merge bitcoin/bitcoin#23288: tests: remove usage of LegacyScriptPubKeyMan from some wallet tests 2021-10-22 15:14:07 +02:00
common scripted-diff: Move bloom to src/common 2021-10-05 11:10:37 +02:00
compat compat: remove glibc_compat.cpp 2021-09-10 11:18:58 +08:00
config
consensus Add comment to COIN constant. 2021-10-16 13:35:57 -07:00
crc32c Update crc32c subtree 2021-09-29 14:10:29 +02:00
crypto Fix K1/K2 use in the comments in ChaCha20-Poly1305 AEAD 2021-10-20 11:54:03 +05:30
index Fix outdated comments referring to ::ChainActive() 2021-10-12 14:36:51 +13:00
init refactor: Block unsafe fs::path std::string conversion calls 2021-10-05 11:10:47 -04:00
interfaces Merge bitcoin/bitcoin#23003: multiprocess: Make interfaces::Chain::isTaprootActive non-const 2021-10-13 07:19:13 +02:00
ipc refactor: Block unsafe fs::path std::string conversion calls 2021-10-05 11:10:47 -04:00
leveldb
logging Make unexpected time type in BCLog::LogMsg() a compile-time error 2021-09-07 19:19:31 +02:00
node [mempool] delete exists(uint256) function 2021-10-21 16:26:59 +01:00
policy [mempool] delete exists(uint256) function 2021-10-21 16:26:59 +01:00
primitives Make GenTxid boolean constructor private 2021-10-22 12:32:16 +02:00
qt Merge bitcoin-core/gui#454: Use only Qt translation primitives in GUI code 2021-10-22 23:50:20 +03:00
rpc [mempool] delete exists(uint256) function 2021-10-21 16:26:59 +01:00
script [MOVEONLY] consensus: move amount.h into consensus 2021-09-30 07:41:57 +08:00
secp256k1 Update secp256k1 subtree to latest upstream + adapt API 2021-07-14 14:43:45 -07:00
support refactor: remove references to deprecated values under std::allocator 2021-10-20 18:36:40 -04:00
test Merge bitcoin/bitcoin#23336: refactor: Make GenTxid boolean constructor private 2021-10-22 17:16:58 +02:00
univalue Update univalue subtree to latest upstream 2021-10-11 20:45:56 +08:00
util Add missing gettimeofday to syscall sandbox 2021-10-19 12:28:13 +02:00
wallet walletdb: Use SQLiteDatabase for mock wallet databases 2021-10-22 17:49:43 -04:00
zmq scripted-diff: Rename overloaded int GetArg to GetIntArg 2021-09-27 06:57:20 -04:00
.clang-format
.clang-tidy Enable clang-tidy bugprone-argument-comment and fix violations 2021-09-07 09:11:10 +02:00
addrdb.cpp refactor: Block unsafe fs::path std::string conversion calls 2021-10-05 11:10:47 -04:00
addrdb.h scripted-diff: Rename CAddrMan to AddrMan 2021-09-28 22:21:10 -04:00
addrman.cpp Merge bitcoin/bitcoin#23140: Make CAddrman::Select_ select buckets, not positions, first 2021-10-22 13:55:05 +02:00
addrman.h [style] Run changed files through clang formatter. 2021-09-28 22:21:10 -04:00
addrman_impl.h [style] Run changed files through clang formatter. 2021-09-28 22:21:10 -04:00
arith_uint256.cpp
arith_uint256.h
attributes.h
banman.cpp Ignore banlist.dat 2021-07-30 11:21:51 +02:00
banman.h scripted-diff: Move bloom to src/common 2021-10-05 11:10:37 +02:00
base58.cpp
base58.h
bech32.cpp Add references for the generator/constant used in Bech32(m) 2021-08-20 15:49:50 -04:00
bech32.h
bitcoin-cli-res.rc windres: use PACKAGE_VERSION rather than building more version numbers 2021-08-17 16:54:47 +08:00
bitcoin-cli.cpp netinfo: print peer counts for all reachable networks 2021-10-20 15:52:54 +02:00
bitcoin-tx-res.rc windres: use PACKAGE_VERSION rather than building more version numbers 2021-08-17 16:54:47 +08:00
bitcoin-tx.cpp bitcoin-tx: Reject non-integral and out of range multisig numbers 2021-10-12 12:45:55 +02:00
bitcoin-util-res.rc windres: use PACKAGE_VERSION rather than building more version numbers 2021-08-17 16:54:47 +08:00
bitcoin-util.cpp
bitcoin-wallet-res.rc windres: use PACKAGE_VERSION rather than building more version numbers 2021-08-17 16:54:47 +08:00
bitcoin-wallet.cpp wallet: Default new wallets to descriptor wallets 2021-09-17 13:32:06 -04:00
bitcoind-res.rc windres: use PACKAGE_VERSION rather than building more version numbers 2021-08-17 16:54:47 +08:00
bitcoind.cpp Add syscall sandboxing (seccomp-bpf) 2021-10-01 13:51:10 +00:00
blockencodings.cpp
blockencodings.h
blockfilter.cpp
blockfilter.h
chain.cpp
chain.h Merge bitcoin/bitcoin#13875: [doc] nChainTx needs to become a 64-bit earlier due to SegWit 2021-10-20 15:52:08 +02:00
chainparams.cpp Use absolute FQDN for DNS seed domains 2021-10-14 17:49:52 +05:30
chainparams.h net: distinguish default port per network 2021-07-09 11:19:36 +02:00
chainparamsbase.cpp test: Activate all regtest softforks at height 1, unless overridden 2021-09-16 18:53:04 +02:00
chainparamsbase.h
chainparamsseeds.h contrib, p2p: update I2P hardcoded seeds 2021-07-30 11:03:44 +02:00
checkqueue.h Add syscall sandboxing (seccomp-bpf) 2021-10-01 13:51:10 +00:00
clientversion.cpp wallet: use FormatFullVersion instead of CLIENT_BUILD in rpcdump 2021-08-16 16:04:47 +08:00
clientversion.h wallet: use FormatFullVersion instead of CLIENT_BUILD in rpcdump 2021-08-16 16:04:47 +08:00
coins.cpp
coins.h
compat.h
compressor.cpp
compressor.h
core_io.h rpc: Add level 3 verbosity to getblock RPC call. 2021-10-05 10:42:34 +02:00
core_memusage.h
core_read.cpp bitcoin-tx: Avoid treating overflow as OP_0 2021-10-11 09:17:28 +02:00
core_write.cpp core_write: Rename calculate_fee to have_undo for clarity 2021-10-05 10:42:34 +02:00
cuckoocache.h
dbwrapper.cpp Merge bitcoin/bitcoin#22937: refactor: Forbid calling unsafe fs::path(std::string) constructor and fs::path::string() method 2021-10-15 10:01:56 +02:00
dbwrapper.h
deploymentinfo.cpp
deploymentinfo.h
deploymentstatus.cpp consensus/params: simplify ValidDeployment check to avoid gcc warning 2021-08-02 23:48:32 +10:00
deploymentstatus.h Use DeploymentEnabled to hide VB deployments 2021-07-01 20:20:52 +02:00
dummywallet.cpp Remove -rescan startup parameter 2021-09-30 12:06:27 +13:00
external_signer.cpp external_signer: improve fingerprint matching logic (stop on first match) 2021-08-24 11:30:09 +02:00
external_signer.h
flatfile.cpp refactor: Block unsafe fs::path std::string conversion calls 2021-10-05 11:10:47 -04:00
flatfile.h
fs.cpp refactor: include a missing <limits> header in fs.cpp 2021-10-22 04:03:45 +03:00
fs.h refactor: Block unsafe fs::path std::string conversion calls 2021-10-05 11:10:47 -04:00
hash.cpp refactor: use {Read,Write}BE32 helpers for BIP32 nChild (de)serialization 2021-10-05 23:53:33 +02:00
hash.h
httprpc.cpp Replace use of boost::trim use with locale-independent TrimString 2021-09-02 13:17:46 +08:00
httprpc.h
httpserver.cpp Merge bitcoin/bitcoin#20487: Add syscall sandboxing using seccomp-bpf (Linux secure computing mode) 2021-10-04 22:45:43 +02:00
httpserver.h
i2p.cpp refactor: Block unsafe fs::path std::string conversion calls 2021-10-05 11:10:47 -04:00
i2p.h
indirectmap.h
init.cpp refactor: Block unsafe fs::path std::string conversion calls 2021-10-05 11:10:47 -04:00
init.h init: remove straggling boost thread_group code 2021-07-12 21:46:59 +08:00
key.cpp refactor: use {Read,Write}BE32 helpers for BIP32 nChild (de)serialization 2021-10-05 23:53:33 +02:00
key.h doc: Remove stale comment for CPrivKey 2021-09-16 21:16:39 +09:00
key_io.cpp
key_io.h
logging.cpp blockstorage: use debug log category 2021-10-11 21:45:49 +10:00
logging.h blockstorage: use debug log category 2021-10-11 21:45:49 +10:00
Makefile.am Merge bitcoin/bitcoin#23137: Move-only: bloom to src/common 2021-10-21 10:30:04 +08:00
Makefile.bench.include bench: add peer eviction protection benchmarks 2021-07-08 12:28:23 +02:00
Makefile.crc32c.include build: remove support for weak linking getauxval() 2021-09-24 15:40:04 +08:00
Makefile.leveldb.include build: remove build stubs for external leveldb 2021-10-15 01:02:45 +00:00
Makefile.qt.include scripted-diff: Prefix makefile variables with QT_ 2021-10-13 21:09:54 +01:00
Makefile.qt_locale.include
Makefile.qttest.include Start using init makeNode, makeChain, etc methods 2021-08-17 03:05:15 -05:00
Makefile.test.include Integrate univalue into our buildsystem 2021-10-11 20:46:25 +08:00
Makefile.test_fuzz.include
Makefile.test_util.include move-only: unittest: add test/util/chainstate.h 2021-09-15 15:46:48 -04:00
Makefile.univalue.include Integrate univalue into our buildsystem 2021-10-11 20:46:25 +08:00
mapport.cpp Add syscall sandboxing (seccomp-bpf) 2021-10-01 13:51:10 +00:00
mapport.h
memusage.h
merkleblock.cpp
merkleblock.h style: Sort 2021-10-05 11:11:18 +02:00
miner.cpp [MOVEONLY] consensus: move amount.h into consensus 2021-09-30 07:41:57 +08:00
miner.h
net.cpp p2p: Use mocktime for ping timeout 2021-10-07 13:22:02 +02:00
net.h Merge bitcoin/bitcoin#23218: p2p: Use mocktime for ping timeout 2021-10-21 19:44:38 +02:00
net_permissions.cpp
net_permissions.h Rate limit the processing of incoming addr messages 2021-07-15 12:52:38 -07:00
net_processing.cpp Merge bitcoin/bitcoin#23336: refactor: Make GenTxid boolean constructor private 2021-10-22 17:16:58 +02:00
net_processing.h scripted-diff: Rename CAddrMan to AddrMan 2021-09-28 22:21:10 -04:00
net_types.cpp MOVEONLY: Expose BanMapToJson / BanMapFromJson 2021-09-03 05:21:58 -04:00
net_types.h MOVEONLY: Expose BanMapToJson / BanMapFromJson 2021-09-03 05:21:58 -04:00
netaddress.cpp scripted-diff: Rename CAddrMan to AddrMan 2021-09-28 22:21:10 -04:00
netaddress.h scripted-diff: Rename CAddrMan to AddrMan 2021-09-28 22:21:10 -04:00
netbase.cpp Cleanup headers after #20788 2021-09-11 10:47:02 +03:00
netbase.h
netmessagemaker.h
noui.cpp
noui.h
outputtype.cpp make ParseOutputType return a std::optional<OutputType> 2021-08-04 19:20:32 +08:00
outputtype.h make ParseOutputType return a std::optional<OutputType> 2021-08-04 19:20:32 +08:00
pow.cpp
pow.h
prevector.h
protocol.cpp Make GenTxid boolean constructor private 2021-10-22 12:32:16 +02:00
protocol.h doc: Remove incorrect INIT_PROTO_VERSION from nTime comment 2021-08-23 18:53:34 +02:00
psbt.cpp
psbt.h
pubkey.cpp refactor: use {Read,Write}BE32 helpers for BIP32 nChild (de)serialization 2021-10-05 23:53:33 +02:00
pubkey.h Consolidate XOnlyPubKey lookup hack 2021-08-23 21:38:34 -04:00
random.cpp
random.h
randomenv.cpp build: remove support for weak linking getauxval() 2021-09-24 15:40:04 +08:00
randomenv.h
rest.cpp Merge bitcoin/bitcoin#22918: rpc: Add level 3 verbosity to getblock RPC call (#21245 modified) 2021-10-19 15:47:53 +02:00
reverse_iterator.h
scheduler.cpp Add syscall sandboxing (seccomp-bpf) 2021-10-01 13:51:10 +00:00
scheduler.h
serialize.h
shutdown.cpp
shutdown.h
signet.cpp Enable clang-tidy bugprone-argument-comment and fix violations 2021-09-07 09:11:10 +02:00
signet.h
span.h
streams.h
sync.cpp log: Avoid broken DEBUG_LOCKORDER log 2021-09-29 18:46:30 +02:00
sync.h sync: inline lock contention logging macro to fix time duration 2021-09-06 23:43:51 +02:00
threadinterrupt.cpp
threadinterrupt.h
threadsafety.h
timedata.cpp scripted-diff: Rename overloaded int GetArg to GetIntArg 2021-09-27 06:57:20 -04:00
timedata.h
tinyformat.h Use C++17 [[fallthrough]] attribute, and drop -Wno-implicit-fallthrough 2021-07-05 08:59:38 +03:00
torcontrol.cpp refactor: Block unsafe fs::path std::string conversion calls 2021-10-05 11:10:47 -04:00
torcontrol.h
txdb.cpp scripted-diff: Rename overloaded int GetArg to GetIntArg 2021-09-27 06:57:20 -04:00
txdb.h Remove txindex migration code 2021-08-20 16:59:41 +02:00
txmempool.cpp remove unused CTxMemPool::info(const uint256& txid) 2021-10-22 12:32:08 +02:00
txmempool.h remove unused CTxMemPool::info(const uint256& txid) 2021-10-22 12:32:08 +02:00
txorphanage.cpp
txorphanage.h [net processing] Add Orphanage empty consistency check 2021-07-20 13:12:42 +01:00
txrequest.cpp Make GenTxid boolean constructor private 2021-10-22 12:32:16 +02:00
txrequest.h
uint256.cpp
uint256.h
undo.h
validation.cpp Make GenTxid boolean constructor private 2021-10-22 12:32:16 +02:00
validation.h Fix outdated comments referring to ::ChainActive() 2021-10-12 14:36:51 +13:00
validationinterface.cpp
validationinterface.h
version.h
versionbits.cpp
versionbits.h
walletinitinterface.h
warnings.cpp
warnings.h