mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-01 03:01:05 +00:00
The indexes test call StartBackgroundSync(), which spawns a thread to run Sync(), only for the test thread to wait for it to complete by calling IndexWaitSynced(). So, since the sync is performed synchronously, we can skip the extra thread creation entirely and call Sync() directly.
31 lines
626 B
CMake
31 lines
626 B
CMake
# Copyright (c) 2023-present The Bitcoin Core developers
|
|
# Distributed under the MIT software license, see the accompanying
|
|
# file COPYING or https://opensource.org/license/mit/.
|
|
|
|
add_library(test_util STATIC EXCLUDE_FROM_ALL
|
|
blockfilter.cpp
|
|
coins.cpp
|
|
coverage.cpp
|
|
json.cpp
|
|
logging.cpp
|
|
mining.cpp
|
|
net.cpp
|
|
random.cpp
|
|
script.cpp
|
|
setup_common.cpp
|
|
str.cpp
|
|
time.cpp
|
|
transaction_utils.cpp
|
|
txmempool.cpp
|
|
validation.cpp
|
|
$<$<BOOL:${ENABLE_WALLET}>:${PROJECT_SOURCE_DIR}/src/wallet/test/util.cpp>
|
|
)
|
|
|
|
target_link_libraries(test_util
|
|
PRIVATE
|
|
core_interface
|
|
Boost::headers
|
|
PUBLIC
|
|
univalue
|
|
)
|