0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-05 14:06:27 -05:00
bitcoin-core/src
Wladimir J. van der Laan 2d46f1be0c
Merge #15118: Refactor block file logic
04cca33094 Style cleanup. (Jim Posen)
4c01e4e159 flatfile: Unit tests for FlatFileSeq methods. (Jim Posen)
65a489e93d scripted-diff: Rename CBlockDiskPos to FlatFilePos. (Jim Posen)
d6d8a78f26 Move CDiskBlockPos from chain to flatfile. (Jim Posen)
e0380933e3 validation: Refactor file flush logic into FlatFileSeq. (Jim Posen)
992404b31e validation: Refactor block file pre-allocation into FlatFileSeq. (Jim Posen)
e2d2abb99f validation: Refactor OpenDiskFile into method on FlatFileSeq. (Jim Posen)
9183d6ef65 validation: Extract basic block file logic into FlatFileSeq class. (Jim Posen)
62e7addb63 util: Move CheckDiskSpace to util. (Jim Posen)

Pull request description:

  This cleans up and refactors block file helpers so that they may be used by the block filter indexer. Per [design discussion](https://github.com/bitcoin/bitcoin/pull/14121#issuecomment-451252591) about storing BIP 157 block filters, it has been suggested that they are stored in the same way as block and undo data. This refactor is sufficient to simplify file operations for this use case, though in the future perhaps more pruning-related logic ought to be moved into the new classes.

  The basic abstraction is a `FlatFileSeq` which manages access to a sequence of numbered files into which raw data is written.

Tree-SHA512: b2108756777f2dad8964a1a2ef2764486e708a4a4a8cfac47b5de8bcb0625388964438eb096b10cfd9ea39212c299b5cb32fa943e768db2333cf49ea7def157e
2019-03-02 23:20:38 +01:00
..
bench tests: Add missing cs_main locks required when accessing pcoinsdbview, pcoinsTip or pblocktree 2019-02-15 10:41:52 +01:00
compat Add compile time verification of assumptions we're currently making implicitly/tacitly 2019-02-14 16:10:02 +01:00
config
consensus
crypto
index scripted-diff: Rename CBlockDiskPos to FlatFilePos. 2019-02-22 17:38:45 -08:00
interfaces refactor: Drop redundant wallet reference 2019-02-21 16:19:29 +00:00
leveldb
node Remove unused TransactionError constants 2019-02-14 10:32:02 -05:00
obj
obj-test
policy
primitives
qt gui: Fix async open wallet call order 2019-02-23 09:29:59 +00:00
rpc Merge #15492: [rpc] remove deprecated generate method 2019-03-02 09:43:39 -05:00
script Merge #15368: Descriptor checksums 2019-02-16 21:39:32 +01:00
secp256k1
support
test Merge #15118: Refactor block file logic 2019-03-02 23:20:38 +01:00
univalue
util Merge #15118: Refactor block file logic 2019-03-02 23:20:38 +01:00
wallet Merge #15492: [rpc] remove deprecated generate method 2019-03-02 09:43:39 -05:00
zmq
.clang-format
addrdb.cpp
addrdb.h
addrman.cpp
addrman.h
amount.h
arith_uint256.cpp
arith_uint256.h
attributes.h
banman.cpp
banman.h
base58.cpp
base58.h
bech32.cpp
bech32.h
bitcoin-cli-res.rc
bitcoin-cli.cpp util: Add SetupHelpOptions() 2019-02-06 14:16:43 -05:00
bitcoin-tx-res.rc
bitcoin-tx.cpp util: Add SetupHelpOptions() 2019-02-06 14:16:43 -05:00
bitcoin-wallet-res.rc [tools] Add wallet inspection and modification tool 2019-01-30 16:26:52 -05:00
bitcoin-wallet.cpp util: Add SetupHelpOptions() 2019-02-06 14:16:43 -05:00
bitcoind-res.rc
bitcoind.cpp
blockencodings.cpp
blockencodings.h
blockfilter.cpp
blockfilter.h
bloom.cpp
bloom.h
chain.cpp
chain.h scripted-diff: Rename CBlockDiskPos to FlatFilePos. 2019-02-22 17:38:45 -08:00
chainparams.cpp Update assumevalid, minimumchainwork, and getchaintxstats to height 563378. 2019-02-17 03:38:08 +00:00
chainparams.h
chainparamsbase.cpp
chainparamsbase.h
chainparamsseeds.h
checkpoints.cpp
checkpoints.h
checkqueue.h
clientversion.cpp
clientversion.h
coins.cpp
coins.h
compat.h
compressor.cpp
compressor.h
core_io.h Split DecodePSBT into Base64 and Raw versions 2019-02-11 12:23:14 -08:00
core_memusage.h
core_read.cpp Move PSBT definitions and code to separate files 2019-02-11 12:23:14 -08:00
core_write.cpp
cuckoocache.h
dbwrapper.cpp
dbwrapper.h
dummywallet.cpp wallet: Factor out LoadWallet 2019-02-04 12:20:42 +00:00
flatfile.cpp Style cleanup. 2019-02-22 17:38:45 -08:00
flatfile.h Style cleanup. 2019-02-22 17:38:45 -08:00
fs.cpp wallet: Use fsbridge::ifstream to fix Windows path issue 2019-02-23 23:44:28 +08:00
fs.h
hash.cpp
hash.h
httprpc.cpp
httprpc.h
httpserver.cpp log: Construct global logger on first use 2019-01-29 15:30:24 -05:00
httpserver.h
indirectmap.h
init.cpp Merge #15118: Refactor block file logic 2019-03-02 23:20:38 +01:00
init.h
key.cpp Fix assertion in CKey::SignCompact 2019-01-31 15:00:56 +00:00
key.h
key_io.cpp Avoid triggering undefined behaviour (std::memset(nullptr, 0, 0)) if an invalid string is passed to DecodeSecret(...) 2019-02-07 22:30:25 +01:00
key_io.h
keystore.cpp
keystore.h
limitedmap.h
logging.cpp log: Construct global logger on first use 2019-01-29 15:30:24 -05:00
logging.h log: Construct global logger on first use 2019-01-29 15:30:24 -05:00
Makefile.am validation: Extract basic block file logic into FlatFileSeq class. 2019-02-22 17:38:45 -08:00
Makefile.bench.include
Makefile.leveldb.include
Makefile.qt.include
Makefile.qttest.include
Makefile.test.include flatfile: Unit tests for FlatFileSeq methods. 2019-02-22 17:38:45 -08:00
memusage.h
merkleblock.cpp
merkleblock.h
miner.cpp [rpc] mining: Omit uninitialized currentblockweight, currentblocktx 2019-02-12 11:34:57 -05:00
miner.h [rpc] mining: Omit uninitialized currentblockweight, currentblocktx 2019-02-12 11:34:57 -05:00
net.cpp Change in transaction pull scheduling to prevent InvBlock-related attacks 2019-02-06 20:25:27 -08:00
net.h Merge #15201: net: Add missing locking annotation for vNodes. vNodes is guarded by cs_vNodes. 2019-02-08 08:58:29 -05:00
net_processing.cpp Merge #14626: Select orphan transaction uniformly for eviction 2019-02-14 16:11:44 -05:00
net_processing.h
netaddress.cpp netaddress: Make IPv4 loopback comment more descriptive 2019-02-04 13:47:55 -05:00
netaddress.h
netbase.cpp
netbase.h
netmessagemaker.h
noui.cpp
noui.h
optional.h Remove 'boost::optional'-related gcc warnings 2019-01-30 22:44:28 +02:00
outputtype.cpp
outputtype.h
pow.cpp
pow.h
prevector.h
protocol.cpp
protocol.h
psbt.cpp Merge #15408: Remove unused TransactionError constants 2019-02-22 11:13:43 -05:00
psbt.h Merge #15408: Remove unused TransactionError constants 2019-02-22 11:13:43 -05:00
pubkey.cpp
pubkey.h
random.cpp Merge #15250: Use RdSeed when available, and reduce RdRand load 2019-02-18 10:56:55 +01:00
random.h Use RdSeed when available, and reduce RdRand load 2019-02-03 17:34:26 -08:00
rest.cpp Merge #15159: [RPC] Remove lookup to UTXO set from GetTransaction 2019-01-30 11:18:44 -05:00
reverse_iterator.h
reverselock.h
scheduler.cpp
scheduler.h trivial: correct parameter name in comments 2019-02-10 17:17:32 -05:00
serialize.h
shutdown.cpp
shutdown.h
span.h
streams.h
sync.cpp
sync.h
threadinterrupt.cpp
threadinterrupt.h
threadsafety.h
timedata.cpp
timedata.h
tinyformat.h
torcontrol.cpp
torcontrol.h
txdb.cpp
txdb.h
txmempool.cpp
txmempool.h remove deprecated mentions of signrawtransaction from fundraw help 2019-02-04 10:26:46 -05:00
ui_interface.cpp
ui_interface.h
uint256.cpp
uint256.h
undo.h
validation.cpp Merge #15118: Refactor block file logic 2019-03-02 23:20:38 +01:00
validation.h scripted-diff: Rename CBlockDiskPos to FlatFilePos. 2019-02-22 17:38:45 -08:00
validationinterface.cpp Check m_internals in UnregisterValidationInterface 2019-02-03 22:23:44 +00:00
validationinterface.h
version.h
versionbits.cpp
versionbits.h
versionbitsinfo.cpp
versionbitsinfo.h
walletinitinterface.h
warnings.cpp
warnings.h