bitcoin/src
furszy 2ec89f1970
refactor: simplify pruning violation check
By generalizing 'GetFirstStoredBlock' and implementing
'CheckBlockDataAvailability' we can dedup code and
avoid repeating work when multiple indexes are enabled.
E.g. get the oldest block across all indexes and
perform the pruning violation check from that point
up to the tip only once (this feature is being introduced
in a follow-up commit).

This commit shouldn't change behavior in any way.

Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
2023-07-10 10:50:50 -03:00
..
bench Merge bitcoin/bitcoin#27978: refactor: Drop unsafe AsBytePtr function 2023-06-29 17:29:40 -04:00
common refactor: remove in-code warning suppression 2023-06-29 14:41:33 +01:00
compat refactor: don't avoid sys/types.h on when building for Windows 2023-04-03 14:44:48 +01:00
config
consensus Use int32_t type for most transaction size/weight values 2023-06-12 19:47:19 +01:00
crc32c Update crc32c subtree to latest upstream master 2022-08-13 13:55:38 +01:00
crypto scripted-diff: Use platform-agnostic ALWAYS_INLINE macro 2023-05-04 20:58:01 +01:00
index refactor: simplify pruning violation check 2023-07-10 10:50:50 -03:00
init init: remove config option names from translated -loglevel strings 2023-06-15 10:27:56 -06:00
interfaces Merge bitcoin/bitcoin#27708: Return EXIT_FAILURE on post-init fatal errors 2023-06-12 12:54:49 -04:00
ipc refactor: Move system from util to common library 2023-05-20 12:08:13 +02:00
kernel kernel: Add fatalError method to notifications 2023-06-28 09:52:33 +02:00
leveldb Update leveldb-subtree subtree to latest upstream 2022-09-29 16:43:30 +01:00
logging Use steady clock for logging timer 2023-01-31 18:48:50 +01:00
minisketch Update minisketch subtree to latest upstream 2022-10-23 15:03:04 +01:00
node refactor: simplify pruning violation check 2023-07-10 10:50:50 -03:00
policy Merge bitcoin/bitcoin#27914: feerate: For GetFeePerK() return nSatoshisPerK instead of round trip through GetFee 2023-06-26 09:43:38 +01:00
primitives scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
qt Merge bitcoin/bitcoin#27861: kernel: Rm ShutdownRequested and AbortNode from validation code. 2023-07-06 17:07:27 -04:00
rpc make GetFirstStoredBlock assert that 'start_block' always has data 2023-07-10 10:47:17 -03:00
script wallet: bugfix, always use apostrophe for spkm descriptor ID 2023-06-28 09:37:16 -03:00
secp256k1 Update src/secp256k1 subtree to version with ElligatorSwift support 2023-06-21 11:04:00 -04:00
support scripted-diff: Following the C++ Standard rules for identifiers with _. 2023-06-20 10:23:08 +02:00
test refactor: simplify pruning violation check 2023-07-10 10:50:50 -03:00
univalue scripted-diff: Following the C++ Standard rules for identifiers with _. 2023-06-20 10:23:08 +02:00
util util: Add SignalInterrupt class and use in shutdown.cpp 2023-06-28 09:49:28 +02:00
wallet Merge bitcoin/bitcoin#28039: wallet: don't include bdb files from our headers 2023-07-07 13:43:28 -04:00
zmq p2p, refactor: return std::optional<CNetAddr> in LookupHost 2023-05-26 13:41:07 -03:00
.bear-tidy-config ci: filter all subtrees from tidy output 2023-06-29 11:59:31 +01:00
.clang-format
.clang-tidy clang-tidy: Exclude performance-* checks rather including them 2023-03-26 20:18:13 +01:00
addrdb.cpp script: appease spelling linter 2023-06-29 16:14:07 -06:00
addrdb.h fix includes for touched header files (iwyu) 2023-05-29 13:26:31 +02:00
addrman.cpp addrman: change asserts to Assumes 2023-05-26 15:47:55 -07:00
addrman.h doc: update Select function description 2023-05-24 12:03:18 -07:00
addrman_impl.h addrman: change asserts to Assumes 2023-05-26 15:47:55 -07:00
arith_uint256.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
arith_uint256.h Fix clang-tidy readability-const-return-type violations 2023-02-01 11:33:35 +01:00
attributes.h Introduce platform-agnostic ALWAYS_INLINE macro 2023-05-04 20:57:51 +01:00
banman.cpp refactor: Move system from util to common library 2023-05-20 12:08:13 +02:00
banman.h refactor: Move fs.* to util/fs.* 2023-03-23 12:55:18 +01:00
base58.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
base58.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
bech32.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
bech32.h
bitcoin-chainstate.cpp scripted-diff: rename 'loadblk' thread name to 'initload' 2023-07-07 19:31:27 -03:00
bitcoin-cli-res.rc
bitcoin-cli.cpp refactor: Move system from util to common library 2023-05-20 12:08:13 +02:00
bitcoin-tx-res.rc
bitcoin-tx.cpp refactor: Move system from util to common library 2023-05-20 12:08:13 +02:00
bitcoin-util-res.rc
bitcoin-util.cpp refactor: Move system from util to common library 2023-05-20 12:08:13 +02:00
bitcoin-wallet-res.rc
bitcoin-wallet.cpp refactor: Move system from util to common library 2023-05-20 12:08:13 +02:00
bitcoind-res.rc
bitcoind.cpp Remove the syscall sandbox 2023-06-16 10:38:19 +01:00
blockencodings.cpp refactor: Move system from util to common library 2023-05-20 12:08:13 +02:00
blockencodings.h script: remove out-of-date snprintf TODO 2023-02-15 14:42:28 -08:00
blockfilter.cpp refactor: use Hash helper for double-SHA256 calculations 2023-01-31 19:34:35 +01:00
blockfilter.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
chain.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
chain.h refactor: add kernel/cs_main.* 2023-01-05 09:05:14 +00:00
chainparams.cpp test: Throw error when -signetchallenge is non-hex 2023-05-25 19:24:05 +02:00
chainparams.h test: Throw error when -signetchallenge is non-hex 2023-05-25 19:24:05 +02:00
chainparamsbase.cpp refactor: Use ChainType enum exhaustively 2023-05-10 10:39:58 +02:00
chainparamsbase.h refactor: Use ChainType enum exhaustively 2023-05-10 10:39:58 +02:00
chainparamsseeds.h p2p: update hardcoded mainnet seeds for 25.x 2023-04-20 06:08:22 -07:00
checkqueue.h Remove the syscall sandbox 2023-06-16 10:38:19 +01:00
clientversion.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
clientversion.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
coins.cpp Use PoolAllocator for CCoinsMap 2023-03-23 19:38:38 +01:00
coins.h Use PoolAllocator for CCoinsMap 2023-03-23 19:38:38 +01:00
compressor.cpp
compressor.h
core_io.h rpc: decode Miniscript descriptor when possible in decodescript 2023-02-03 18:15:42 +01:00
core_memusage.h
core_read.cpp Use DataStream where possible 2023-01-26 10:44:05 +01:00
core_write.cpp refactor: Move system from util to common library 2023-05-20 12:08:13 +02:00
cuckoocache.h clang-tidy: Fix modernize-use-default-member-init in headers 2023-01-31 11:50:10 +00:00
dbwrapper.cpp refactor: Move fs.* to util/fs.* 2023-03-23 12:55:18 +01:00
dbwrapper.h refactor: Move fs.* to util/fs.* 2023-03-23 12:55:18 +01:00
deploymentinfo.cpp Decouple RegTestChainParams from ArgsManager 2023-03-15 16:42:42 +01:00
deploymentinfo.h Decouple RegTestChainParams from ArgsManager 2023-03-15 16:42:42 +01:00
deploymentstatus.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
deploymentstatus.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
dummywallet.cpp move-only: Extract common/args and common/config.cpp from util/system 2023-04-19 10:48:30 +02:00
external_signer.cpp Fix clang-tidy performance-unnecessary-copy-initialization warnings 2023-05-09 18:48:52 +02:00
external_signer.h refactor: Move system from util to common library 2023-05-20 12:08:13 +02:00
flatfile.cpp refactor: Extract util/fs_helpers from util/system 2023-03-23 12:52:00 +01:00
flatfile.h Merge bitcoin/bitcoin#27254: refactor: Extract util/fs from util/system 2023-04-03 14:41:22 +01:00
hash.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
hash.h Merge bitcoin/bitcoin#26649: refactor: Use AutoFile and HashVerifier (without ser-type and ser-version) where possible 2023-01-30 15:57:12 +00:00
headerssync.cpp [headerssync] Make m_commit_offset protected 2022-12-12 21:06:04 +00:00
headerssync.h [headerssync] Make m_commit_offset protected 2022-12-12 21:06:04 +00:00
httprpc.cpp scripted-diff: Use UniValue::find_value method 2023-05-09 18:47:14 +02:00
httprpc.h
httpserver.cpp Merge bitcoin/bitcoin#27949: http: update libevent workaround to correct version 2023-06-28 12:20:25 +01:00
httpserver.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
i2p.cpp refactor: Move system from util to common library 2023-05-20 12:08:13 +02:00
i2p.h refactor: Move fs.* to util/fs.* 2023-03-23 12:55:18 +01:00
indirectmap.h
init.cpp refactor: index, decouple 'Init' from 'Start' 2023-07-10 10:47:17 -03:00
init.h refactor: index, decouple 'Init' from 'Start' 2023-07-10 10:47:17 -03:00
key.cpp Add ElligatorSwift key creation and ECDH logic 2023-06-23 14:22:33 -04:00
key.h Add ElligatorSwift key creation and ECDH logic 2023-06-23 14:22:33 -04:00
key_io.cpp use 'byte'/'bytes' for bech32(m) validation error 2023-05-25 06:30:10 +00:00
key_io.h
logging.cpp refactor: rename BCLog::BLOCKSTORE to BLOCKSTORAGE 2023-06-15 10:27:56 -06:00
logging.h refactor: rename BCLog::BLOCKSTORE to BLOCKSTORAGE 2023-06-15 10:27:56 -06:00
Makefile.am kernel: Add fatalError method to notifications 2023-06-28 09:52:33 +02:00
Makefile.bench.include Bench test for EllSwift ECDH 2023-06-23 14:24:32 -04:00
Makefile.crc32c.include build: Create .la library for crc32c 2022-04-26 16:25:38 -04:00
Makefile.leveldb.include Use more specific path when including memenv.h header 2022-06-23 15:33:01 +02:00
Makefile.minisketch.include build: Build minisketch test in make check, not in make 2022-07-21 10:42:09 +01:00
Makefile.qt.include Build: Log when test -f fails in Makefile 2023-02-03 22:33:14 +01:00
Makefile.qt_locale.include qt: Periodic translation updates from Transifex 2023-02-27 13:53:29 +00:00
Makefile.qttest.include build: extract $(BOOST_CPPFLAGS) from $(BITCOIN_INCLUDES) 2022-09-13 17:15:17 +01:00
Makefile.test.include fuzz: wallet, add target for CoinControl 2023-06-17 23:55:16 +05:30
Makefile.test_fuzz.include [fuzz] Move ConsumeNetAddr to fuzz/util/net.h 2022-11-17 14:52:45 +00:00
Makefile.test_util.include test: Use same timeout for all index sync 2023-06-28 12:45:36 +02:00
Makefile.univalue.include
mapport.cpp Remove the syscall sandbox 2023-06-16 10:38:19 +01:00
mapport.h Remove configure-time setting of DEFAULT_UPNP 2023-01-28 15:24:13 +00:00
memusage.h Calculate memory usage correctly for unordered_maps that use PoolAllocator 2023-03-23 19:38:38 +01:00
merkleblock.cpp
merkleblock.h
net.cpp Merge bitcoin/bitcoin#27863: net: do not break when addr is not from a distinct network group 2023-06-29 19:42:47 -04:00
net.h net: remove unused CConnmanTest 2023-06-23 18:03:06 -03:00
net_permissions.cpp Merge bitcoin/bitcoin#26261: p2p: cleanup LookupIntern, Lookup and LookupHost 2023-05-30 11:39:59 -04:00
net_permissions.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
net_processing.cpp Merge bitcoin/bitcoin#27947: MaybePunishNodeForTx: Remove unused message arg and logging 2023-06-26 10:39:32 +01:00
net_processing.h Support up to 3 parallel compact block txn fetchings 2023-05-23 13:07:49 -04:00
net_types.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
net_types.h
netaddress.cpp Merge bitcoin/bitcoin#25619: net: avoid overriding non-virtual ToString() in CService and use better naming 2023-02-17 13:34:40 -05:00
netaddress.h Merge bitcoin/bitcoin#25619: net: avoid overriding non-virtual ToString() in CService and use better naming 2023-02-17 13:34:40 -05:00
netbase.cpp Remove now-unnecessary poll, fcntl includes from net(base).cpp 2023-06-28 16:35:45 -05:00
netbase.h p2p, refactor: return std::optional<CNetAddr> in LookupHost 2023-05-26 13:41:07 -03:00
netgroup.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
netgroup.h [netgroupman] Remove NetGroupManager::GetAsmap() 2022-04-20 14:35:53 +01:00
netmessagemaker.h
noui.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
noui.h
outputtype.cpp Don't return OutputType::UNKNOWN in ParseOutputType 2023-04-16 23:48:05 +02:00
outputtype.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
pow.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
pow.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
prevector.h util: implement prevector's move ctor & move assignment 2023-03-26 15:49:52 +02:00
protocol.cpp refactor: Move system from util to common library 2023-05-20 12:08:13 +02:00
protocol.h doc: Remove unused NO_BLOOM_VERSION constant 2023-05-15 10:18:58 +02:00
psbt.cpp Merge bitcoin/bitcoin#25939: rpc: In utxoupdatepsbt also look for the tx in the txindex 2023-04-21 14:06:12 -04:00
psbt.h Merge bitcoin/bitcoin#25939: rpc: In utxoupdatepsbt also look for the tx in the txindex 2023-04-21 14:06:12 -04:00
pubkey.cpp Add ElligatorSwift key creation and ECDH logic 2023-06-23 14:22:33 -04:00
pubkey.h Use only Span{} constructor for byte-like types where possible 2023-06-27 10:13:37 +02:00
random.cpp Allow FastRandomContext::randbytes for all byte types 2023-06-30 12:09:44 +02:00
random.h Allow FastRandomContext::randbytes for all byte types 2023-06-30 12:09:44 +02:00
randomenv.cpp refactor: don't avoid sys/types.h on when building for Windows 2023-04-03 14:44:48 +01:00
randomenv.h
rest.cpp rest: bugfix, fix crash error when calling /deploymentinfo 2023-06-12 10:24:14 -03:00
rest.h Handle query string when parsing data format 2022-03-10 12:01:53 +01:00
reverse_iterator.h doc: remove usages of C++11 2023-01-12 13:42:44 +00:00
scheduler.cpp Remove the syscall sandbox 2023-06-16 10:38:19 +01:00
scheduler.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
serialize.h Allow std::byte serialization 2023-06-30 12:09:45 +02:00
shutdown.cpp kernel: Add fatalError method to notifications 2023-06-28 09:52:33 +02:00
shutdown.h kernel: Add fatalError method to notifications 2023-06-28 09:52:33 +02:00
signet.cpp refactor: Move system from util to common library 2023-05-20 12:08:13 +02:00
signet.h
span.h refactor: Drop unsafe AsBytePtr function 2023-06-28 15:14:45 -04:00
streams.h streams: Drop confusing DataStream::Serialize method and << operator 2023-06-01 10:27:33 -04:00
sync.cpp
sync.h doc: Export threadsafety.h from sync.h 2023-01-25 09:33:26 +01:00
threadsafety.h
timedata.cpp move-only: Extract common/args and common/config.cpp from util/system 2023-04-19 10:48:30 +02:00
timedata.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
tinyformat.h clang-tidy: Fix modernize-use-default-member-init in headers 2023-01-31 11:50:10 +00:00
torcontrol.cpp Remove the syscall sandbox 2023-06-16 10:38:19 +01:00
torcontrol.h refactor: Move fs.* to util/fs.* 2023-03-23 12:55:18 +01:00
txdb.cpp kernel: Pass interrupt reference to chainman 2023-06-28 09:52:27 +02:00
txdb.h kernel: Pass interrupt reference to chainman 2023-06-28 09:52:27 +02:00
txmempool.cpp refactor: Make m_count_with_* in CTxMemPoolEntry int64_t, drop UBSAN supp 2023-06-14 23:15:20 +02:00
txmempool.h Use int32_t type for most transaction size/weight values 2023-06-12 19:47:19 +01:00
txorphanage.cpp scripted-diff: Following the C++ Standard rules for identifiers with _. 2023-06-20 10:23:08 +02:00
txorphanage.h scripted-diff: Following the C++ Standard rules for identifiers with _. 2023-06-20 10:23:08 +02:00
txrequest.cpp Add public Boost headers explicitly 2023-05-31 15:43:01 +01:00
txrequest.h
uint256.cpp refactor: modernize the implementation of uint256.* 2022-12-10 14:34:44 -06:00
uint256.h Merge bitcoin/bitcoin#27927: util: Allow std::byte and char Span serialization 2023-06-28 15:12:12 -04:00
undo.h
validation.cpp kernel: Add fatalError method to notifications 2023-06-28 09:52:33 +02:00
validation.h scripted-diff: rename 'loadblk' thread name to 'initload' 2023-07-07 19:31:27 -03:00
validationinterface.cpp Fix clang-tidy readability-const-return-type violations 2023-02-01 11:33:35 +01:00
validationinterface.h refactor: add kernel/cs_main.* 2023-01-05 09:05:14 +00:00
version.h doc: Remove unused NO_BLOOM_VERSION constant 2023-05-15 10:18:58 +02:00
versionbits.cpp refactor: use braced init for integer constants instead of c style casts 2023-01-03 19:31:29 -06:00
versionbits.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
walletinitinterface.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
warnings.cpp refactor: Move system from util to common library 2023-05-20 12:08:13 +02:00
warnings.h