Branch data Line data Source code
1 : : // Copyright (c) 2011-present The Bitcoin Core developers
2 : : // Distributed under the MIT software license, see the accompanying
3 : : // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 : :
5 : : #ifndef BITCOIN_NODE_BLOCKSTORAGE_H
6 : : #define BITCOIN_NODE_BLOCKSTORAGE_H
7 : :
8 : : #include <attributes.h>
9 : : #include <chain.h>
10 : : #include <dbwrapper.h>
11 : : #include <flatfile.h>
12 : : #include <kernel/blockmanager_opts.h>
13 : : #include <kernel/chainparams.h>
14 : : #include <kernel/cs_main.h>
15 : : #include <kernel/messagestartchars.h>
16 : : #include <primitives/block.h>
17 : : #include <serialize.h>
18 : : #include <streams.h>
19 : : #include <sync.h>
20 : : #include <uint256.h>
21 : : #include <util/expected.h>
22 : : #include <util/fs.h>
23 : : #include <util/hasher.h>
24 : : #include <util/obfuscation.h>
25 : :
26 : : #include <algorithm>
27 : : #include <array>
28 : : #include <atomic>
29 : : #include <cstddef>
30 : : #include <cstdint>
31 : : #include <functional>
32 : : #include <iosfwd>
33 : : #include <limits>
34 : : #include <map>
35 : : #include <memory>
36 : : #include <optional>
37 : : #include <set>
38 : : #include <span>
39 : : #include <string>
40 : : #include <unordered_map>
41 : : #include <utility>
42 : : #include <vector>
43 : :
44 : : class BlockValidationState;
45 : : class CBlockUndo;
46 : : class Chainstate;
47 : : class ChainstateManager;
48 : : namespace Consensus {
49 : : struct Params;
50 : : }
51 : : namespace util {
52 : : class SignalInterrupt;
53 : : } // namespace util
54 : :
55 : : namespace kernel {
56 : : class CBlockFileInfo
57 : : {
58 : : public:
59 : : uint32_t nBlocks{}; //!< number of blocks stored in file
60 : : uint32_t nSize{}; //!< number of used bytes of block file
61 : : uint32_t nUndoSize{}; //!< number of used bytes in the undo file
62 : : uint32_t nHeightFirst{}; //!< lowest height of block in file
63 : : uint32_t nHeightLast{}; //!< highest height of block in file
64 : : uint64_t nTimeFirst{}; //!< earliest time of block in file
65 : : uint64_t nTimeLast{}; //!< latest time of block in file
66 : :
67 : 76 : SERIALIZE_METHODS(CBlockFileInfo, obj)
68 : : {
69 : 38 : READWRITE(VARINT(obj.nBlocks));
70 : 38 : READWRITE(VARINT(obj.nSize));
71 : 38 : READWRITE(VARINT(obj.nUndoSize));
72 : 38 : READWRITE(VARINT(obj.nHeightFirst));
73 : 38 : READWRITE(VARINT(obj.nHeightLast));
74 : 38 : READWRITE(VARINT(obj.nTimeFirst));
75 : 38 : READWRITE(VARINT(obj.nTimeLast));
76 : 38 : }
77 : :
78 : 204 : CBlockFileInfo() = default;
79 : :
80 : : std::string ToString() const;
81 : :
82 : : /** update statistics (does not update nSize) */
83 : 8299 : void AddBlock(unsigned int nHeightIn, uint64_t nTimeIn)
84 : : {
85 [ + + - + ]: 8299 : if (nBlocks == 0 || nHeightFirst > nHeightIn)
86 : 194 : nHeightFirst = nHeightIn;
87 [ + + - + ]: 8299 : if (nBlocks == 0 || nTimeFirst > nTimeIn)
88 : 194 : nTimeFirst = nTimeIn;
89 : 8299 : nBlocks++;
90 [ + + ]: 8299 : if (nHeightIn > nHeightLast)
91 : 7510 : nHeightLast = nHeightIn;
92 [ + + ]: 8299 : if (nTimeIn > nTimeLast)
93 : 7622 : nTimeLast = nTimeIn;
94 : 8299 : }
95 : : };
96 : :
97 : : /** Access to the block database (blocks/index/) */
98 : 197 : class BlockTreeDB : public CDBWrapper
99 : : {
100 : : public:
101 [ + - ]: 197 : using CDBWrapper::CDBWrapper;
102 : : void WriteBatchSync(const std::vector<std::pair<int, const CBlockFileInfo*>>& fileInfo, int nLastFile, const std::vector<const CBlockIndex*>& blockinfo);
103 : : bool ReadBlockFileInfo(int nFile, CBlockFileInfo& info);
104 : : bool ReadLastBlockFile(int& nFile);
105 : : void WriteReindexing(bool fReindexing);
106 : : void ReadReindexing(bool& fReindexing);
107 : : void WriteFlag(const std::string& name, bool fValue);
108 : : bool ReadFlag(const std::string& name, bool& fValue);
109 : : bool LoadBlockIndexGuts(const Consensus::Params& consensusParams, std::function<CBlockIndex*(const uint256&)> insertBlockIndex, const util::SignalInterrupt& interrupt)
110 : : EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
111 : : };
112 : : } // namespace kernel
113 : :
114 : : namespace node {
115 : : using kernel::CBlockFileInfo;
116 : : using kernel::BlockTreeDB;
117 : :
118 : : /** The pre-allocation chunk size for blk?????.dat files (since 0.8) */
119 : : static const unsigned int BLOCKFILE_CHUNK_SIZE = 0x1000000; // 16 MiB
120 : : /** The pre-allocation chunk size for rev?????.dat files (since 0.8) */
121 : : static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000; // 1 MiB
122 : : /** The maximum size of a blk?????.dat file (since 0.8) */
123 : : static const unsigned int MAX_BLOCKFILE_SIZE = 0x8000000; // 128 MiB
124 : :
125 : : /** Size of header written by WriteBlock before a serialized CBlock (8 bytes) */
126 : : static constexpr uint32_t STORAGE_HEADER_BYTES{std::tuple_size_v<MessageStartChars> + sizeof(unsigned int)};
127 : :
128 : : /** Total overhead when writing undo data: header (8 bytes) plus checksum (32 bytes) */
129 : : static constexpr uint32_t UNDO_DATA_DISK_OVERHEAD{STORAGE_HEADER_BYTES + uint256::size()};
130 : :
131 : : // Because validation code takes pointers to the map's CBlockIndex objects, if
132 : : // we ever switch to another associative container, we need to either use a
133 : : // container that has stable addressing (true of all std associative
134 : : // containers), or make the key a `std::unique_ptr<CBlockIndex>`
135 : : using BlockMap = std::unordered_map<uint256, CBlockIndex, BlockHasher>;
136 : :
137 : : struct CBlockIndexWorkComparator {
138 : : bool operator()(const CBlockIndex* pa, const CBlockIndex* pb) const;
139 : : };
140 : :
141 : : struct CBlockIndexHeightOnlyComparator {
142 : : /* Only compares the height of two block indices, doesn't try to tie-break */
143 : : bool operator()(const CBlockIndex* pa, const CBlockIndex* pb) const;
144 : : };
145 : :
146 : 3 : struct PruneLockInfo {
147 : : int height_first{std::numeric_limits<int>::max()}; //! Height of earliest block that should be kept and not pruned
148 : : };
149 : :
150 : : enum BlockfileType {
151 : : // Values used as array indexes - do not change carelessly.
152 : : NORMAL = 0,
153 : : ASSUMED = 1,
154 : : NUM_TYPES = 2,
155 : : };
156 : :
157 : : std::ostream& operator<<(std::ostream& os, const BlockfileType& type);
158 : :
159 : : struct BlockfileCursor {
160 : : // The latest blockfile number.
161 : : int file_num{0};
162 : :
163 : : // Track the height of the highest block in file_num whose undo
164 : : // data has been written. Block data is written to block files in download
165 : : // order, but is written to undo files in validation order, which is
166 : : // usually in order by height. To avoid wasting disk space, undo files will
167 : : // be trimmed whenever the corresponding block file is finalized and
168 : : // the height of the highest block written to the block file equals the
169 : : // height of the highest block written to the undo file. This is a
170 : : // heuristic and can sometimes preemptively trim undo files that will write
171 : : // more data later, and sometimes fail to trim undo files that can't have
172 : : // more data written later.
173 : : int undo_height{0};
174 : : };
175 : :
176 : : std::ostream& operator<<(std::ostream& os, const BlockfileCursor& cursor);
177 : :
178 : : enum class ReadRawError {
179 : : IO,
180 : : BadPartRange,
181 : : };
182 : :
183 : : /**
184 : : * Maintains a tree of blocks (stored in `m_block_index`) which is consulted
185 : : * to determine where the most-work tip is.
186 : : *
187 : : * This data is used mostly in `Chainstate` - information about, e.g.,
188 : : * candidate tips is not maintained here.
189 : : */
190 : : class BlockManager
191 : : {
192 : : friend Chainstate;
193 : : friend ChainstateManager;
194 : :
195 : : private:
196 [ + - - + : 21356 : const CChainParams& GetParams() const { return m_opts.chainparams; }
+ - ]
197 [ + - - + : 10274 : const Consensus::Params& GetConsensus() const { return m_opts.chainparams.GetConsensus(); }
- - + - ]
198 : : /**
199 : : * Load the blocktree off disk and into memory. Populate certain metadata
200 : : * per index entry (nStatus, nChainWork, nTimeMax, etc.) as well as peripheral
201 : : * collections like m_dirty_blockindex.
202 : : */
203 : : bool LoadBlockIndex(const std::optional<uint256>& snapshot_blockhash)
204 : : EXCLUSIVE_LOCKS_REQUIRED(cs_main);
205 : :
206 : : /** Return false if block file or undo file flushing fails. */
207 : : [[nodiscard]] bool FlushBlockFile(int blockfile_num, bool fFinalize, bool finalize_undo);
208 : :
209 : : /** Return false if undo file flushing fails. */
210 : : [[nodiscard]] bool FlushUndoFile(int block_file, bool finalize = false);
211 : :
212 : : /**
213 : : * Helper function performing various preparations before a block can be saved to disk:
214 : : * Returns the correct position for the block to be saved, which may be in the current or a new
215 : : * block file depending on nAddSize. May flush the previous blockfile to disk if full, updates
216 : : * blockfile info, and checks if there is enough disk space to save the block.
217 : : *
218 : : * The nAddSize argument passed to this function should include not just the size of the serialized CBlock, but also the size of
219 : : * separator fields (STORAGE_HEADER_BYTES).
220 : : */
221 : : [[nodiscard]] FlatFilePos FindNextBlockPos(unsigned int nAddSize, unsigned int nHeight, uint64_t nTime);
222 : : [[nodiscard]] bool FlushChainstateBlockFile(int tip_height);
223 : : bool FindUndoPos(BlockValidationState& state, int nFile, FlatFilePos& pos, unsigned int nAddSize);
224 : :
225 : : AutoFile OpenUndoFile(const FlatFilePos& pos, bool fReadOnly = false) const;
226 : :
227 : : /* Calculate the block/rev files to delete based on height specified by user with RPC command pruneblockchain */
228 : : void FindFilesToPruneManual(
229 : : std::set<int>& setFilesToPrune,
230 : : int nManualPruneHeight,
231 : : const Chainstate& chain);
232 : :
233 : : /**
234 : : * Prune block and undo files (blk???.dat and rev???.dat) so that the disk space used is less than a user-defined target.
235 : : * The user sets the target (in MB) on the command line or in config file. This will be run on startup and whenever new
236 : : * space is allocated in a block or undo file, staying below the target. Changing back to unpruned requires a reindex
237 : : * (which in this case means the blockchain must be re-downloaded.)
238 : : *
239 : : * Pruning functions are called from FlushStateToDisk when the m_check_for_pruning flag has been set.
240 : : * Block and undo files are deleted in lock-step (when blk00003.dat is deleted, so is rev00003.dat.)
241 : : * Pruning cannot take place until the longest chain is at least a certain length (CChainParams::nPruneAfterHeight).
242 : : * Pruning will never delete a block within a defined distance (currently 288) from the active chain's tip.
243 : : * The block index is updated by unsetting HAVE_DATA and HAVE_UNDO for any blocks that were stored in the deleted files.
244 : : * A db flag records the fact that at least some block files have been pruned.
245 : : *
246 : : * @param[out] setFilesToPrune The set of file indices that can be unlinked will be returned
247 : : * @param last_prune The last height we're able to prune, according to the prune locks
248 : : */
249 : : void FindFilesToPrune(
250 : : std::set<int>& setFilesToPrune,
251 : : int last_prune,
252 : : const Chainstate& chain,
253 : : ChainstateManager& chainman);
254 : :
255 : : RecursiveMutex cs_LastBlockFile;
256 : :
257 : : //! Since assumedvalid chainstates may be syncing a range of the chain that is very
258 : : //! far away from the normal/background validation process, we should segment blockfiles
259 : : //! for assumed chainstates. Otherwise, we might have wildly different height ranges
260 : : //! mixed into the same block files, which would impair our ability to prune
261 : : //! effectively.
262 : : //!
263 : : //! This data structure maintains separate blockfile number cursors for each
264 : : //! BlockfileType. The ASSUMED state is initialized, when necessary, in FindNextBlockPos().
265 : : //!
266 : : //! The first element is the NORMAL cursor, second is ASSUMED.
267 : : std::array<std::optional<BlockfileCursor>, BlockfileType::NUM_TYPES>
268 : : m_blockfile_cursors GUARDED_BY(cs_LastBlockFile) = {
269 : : BlockfileCursor{},
270 : : std::nullopt,
271 : : };
272 : 288 : int MaxBlockfileNum() const EXCLUSIVE_LOCKS_REQUIRED(cs_LastBlockFile)
273 : : {
274 : 288 : static const BlockfileCursor empty_cursor;
275 [ + - ]: 288 : const auto& normal = m_blockfile_cursors[BlockfileType::NORMAL].value_or(empty_cursor);
276 [ + + ]: 288 : const auto& assumed = m_blockfile_cursors[BlockfileType::ASSUMED].value_or(empty_cursor);
277 [ + + ]: 288 : return std::max(normal.file_num, assumed.file_num);
278 : : }
279 : :
280 : : /** Global flag to indicate we should check to see if there are
281 : : * block/undo files that should be deleted. Set on startup
282 : : * or if we allocate more file space when we're in prune mode
283 : : */
284 : : bool m_check_for_pruning = false;
285 : :
286 : : const bool m_prune_mode;
287 : :
288 : : const Obfuscation m_obfuscation;
289 : :
290 : : /**
291 : : * Map from external index name to oldest block that must not be pruned.
292 : : *
293 : : * @note Internally, only blocks at height (height_first - PRUNE_LOCK_BUFFER - 1) and
294 : : * below will be pruned, but callers should avoid assuming any particular buffer size.
295 : : */
296 : : std::unordered_map<std::string, PruneLockInfo> m_prune_locks GUARDED_BY(::cs_main);
297 : :
298 : : BlockfileType BlockfileTypeForHeight(int height);
299 : :
300 : : const kernel::BlockManagerOpts m_opts;
301 : :
302 : : const FlatFileSeq m_block_file_seq;
303 : : const FlatFileSeq m_undo_file_seq;
304 : :
305 : : protected:
306 : : std::vector<CBlockFileInfo> m_blockfile_info;
307 : :
308 : : /** Dirty block index entries. */
309 : : std::set<CBlockIndex*> m_dirty_blockindex;
310 : :
311 : : /** Dirty block file entries. */
312 : : std::set<int> m_dirty_fileinfo;
313 : :
314 : : public:
315 : : using Options = kernel::BlockManagerOpts;
316 : : using ReadRawBlockResult = util::Expected<std::vector<std::byte>, ReadRawError>;
317 : :
318 : : explicit BlockManager(const util::SignalInterrupt& interrupt, Options opts);
319 : :
320 : : const util::SignalInterrupt& m_interrupt;
321 : : std::atomic<bool> m_importing{false};
322 : :
323 : : /**
324 : : * Whether all blockfiles have been added to the block tree database.
325 : : * Normally true, but set to false when a reindex is requested and the
326 : : * database is wiped. The value is persisted in the database across restarts
327 : : * and will be false until reindexing completes.
328 : : */
329 : : std::atomic_bool m_blockfiles_indexed{true};
330 : :
331 : : BlockMap m_block_index GUARDED_BY(cs_main);
332 : :
333 : : /**
334 : : * The height of the base block of an assumeutxo snapshot, if one is in use.
335 : : *
336 : : * This controls how blockfiles are segmented by chainstate type to avoid
337 : : * comingling different height regions of the chain when an assumedvalid chainstate
338 : : * is in use. If heights are drastically different in the same blockfile, pruning
339 : : * suffers.
340 : : *
341 : : * This is set during ActivateSnapshot() or upon LoadBlockIndex() if a snapshot
342 : : * had been previously loaded. After the snapshot is validated, this is unset to
343 : : * restore normal LoadBlockIndex behavior.
344 : : */
345 : : std::optional<int> m_snapshot_height;
346 : :
347 : : std::vector<CBlockIndex*> GetAllBlockIndices() EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
348 : :
349 : : /**
350 : : * All pairs A->B, where A (or one of its ancestors) misses transactions, but B has transactions.
351 : : * Pruned nodes may have entries where B is missing data.
352 : : */
353 : : std::multimap<CBlockIndex*, CBlockIndex*> m_blocks_unlinked;
354 : :
355 : : std::unique_ptr<BlockTreeDB> m_block_tree_db GUARDED_BY(::cs_main);
356 : :
357 : : void WriteBlockIndexDB() EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
358 : : bool LoadBlockIndexDB(const std::optional<uint256>& snapshot_blockhash)
359 : : EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
360 : :
361 : : /**
362 : : * Remove any pruned block & undo files that are still on disk.
363 : : * This could happen on some systems if the file was still being read while unlinked,
364 : : * or if we crash before unlinking.
365 : : */
366 : : void ScanAndUnlinkAlreadyPrunedFiles() EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
367 : :
368 : : CBlockIndex* AddToBlockIndex(const CBlockHeader& block, CBlockIndex*& best_header) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
369 : : /** Create a new block index entry for a given block hash */
370 : : CBlockIndex* InsertBlockIndex(const uint256& hash) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
371 : :
372 : : //! Mark one block file as pruned (modify associated database entries)
373 : : void PruneOneBlockFile(const int fileNumber) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
374 : :
375 : : CBlockIndex* LookupBlockIndex(const uint256& hash) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
376 : : const CBlockIndex* LookupBlockIndex(const uint256& hash) const EXCLUSIVE_LOCKS_REQUIRED(cs_main);
377 : :
378 : : /** Get block file info entry for one block file */
379 : : CBlockFileInfo* GetBlockFileInfo(size_t n);
380 : :
381 : : bool WriteBlockUndo(const CBlockUndo& blockundo, BlockValidationState& state, CBlockIndex& block)
382 : : EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
383 : :
384 : : /** Store block on disk and update block file statistics.
385 : : *
386 : : * @param[in] block the block to be stored
387 : : * @param[in] nHeight the height of the block
388 : : *
389 : : * @returns in case of success, the position to which the block was written to
390 : : * in case of an error, an empty FlatFilePos
391 : : */
392 : : FlatFilePos WriteBlock(const CBlock& block, int nHeight);
393 : :
394 : : /** Update blockfile info while processing a block during reindex. The block must be available on disk.
395 : : *
396 : : * @param[in] block the block being processed
397 : : * @param[in] nHeight the height of the block
398 : : * @param[in] pos the position of the serialized CBlock on disk
399 : : */
400 : : void UpdateBlockInfo(const CBlock& block, unsigned int nHeight, const FlatFilePos& pos);
401 : :
402 : : /** Whether running in -prune mode. */
403 [ + + ][ - + : 25449 : [[nodiscard]] bool IsPruneMode() const { return m_prune_mode; }
- + + - -
- ][ - + +
+ - + #
# ][ # # #
# # # # #
# # ]
404 : :
405 : : /** Attempt to stay below this number of bytes of block files. */
406 [ - + ]: 191 : [[nodiscard]] uint64_t GetPruneTarget() const { return m_opts.prune_target; }
[ # # # # ]
407 : : static constexpr auto PRUNE_TARGET_MANUAL{std::numeric_limits<uint64_t>::max()};
408 : :
409 [ + + + + ]: 20746 : [[nodiscard]] bool LoadingBlocks() const { return m_importing || !m_blockfiles_indexed; }
410 : :
411 : : /** Calculate the amount of disk space the block & undo files currently use */
412 : : uint64_t CalculateCurrentUsage();
413 : :
414 : : //! Check if all blocks in the [upper_block, lower_block] range have data available.
415 : : //! The caller is responsible for ensuring that lower_block is an ancestor of upper_block
416 : : //! (part of the same chain).
417 : : bool CheckBlockDataAvailability(const CBlockIndex& upper_block, const CBlockIndex& lower_block) EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
418 : :
419 : : /**
420 : : * @brief Returns the earliest block with specified `status_mask` flags set after
421 : : * the latest block _not_ having those flags.
422 : : *
423 : : * This function starts from `upper_block`, which must have all
424 : : * `status_mask` flags set, and iterates backwards through its ancestors. It
425 : : * continues as long as each block has all `status_mask` flags set, until
426 : : * reaching the oldest ancestor or `lower_block`.
427 : : *
428 : : * @pre `upper_block` must have all `status_mask` flags set.
429 : : * @pre `lower_block` must be null or an ancestor of `upper_block`
430 : : *
431 : : * @param upper_block The starting block for the search, which must have all
432 : : * `status_mask` flags set.
433 : : * @param status_mask Bitmask specifying required status flags.
434 : : * @param lower_block The earliest possible block to return. If null, the
435 : : * search can extend to the genesis block.
436 : : *
437 : : * @return A reference to the earliest block between `upper_block`
438 : : * and `lower_block`, inclusive, such that every block between the
439 : : * returned block and `upper_block` has `status_mask` flags set.
440 : : */
441 : : const CBlockIndex& GetFirstBlock(
442 : : const CBlockIndex& upper_block LIFETIMEBOUND,
443 : : uint32_t status_mask,
444 : : const CBlockIndex* lower_block LIFETIMEBOUND = nullptr
445 : : ) const EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
446 : :
447 : : /** True if any block files have ever been pruned. */
448 : : bool m_have_pruned = false;
449 : :
450 : : //! Check whether the block associated with this index entry is pruned or not.
451 : : bool IsBlockPruned(const CBlockIndex& block) const EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
452 : :
453 : : //! Create or update a prune lock identified by its name
454 : : void UpdatePruneLock(const std::string& name, const PruneLockInfo& lock_info) EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
455 : :
456 : : /** Open a block file (blk?????.dat) */
457 : : AutoFile OpenBlockFile(const FlatFilePos& pos, bool fReadOnly) const;
458 : :
459 : : /** Translation to a filesystem path */
460 : : fs::path GetBlockPosFilename(const FlatFilePos& pos) const;
461 : :
462 : : /**
463 : : * Actually unlink the specified files
464 : : */
465 : : void UnlinkPrunedFiles(const std::set<int>& setFilesToPrune) const;
466 : :
467 : : /** Functions for disk access for blocks */
468 : : bool ReadBlock(CBlock& block, const FlatFilePos& pos, const std::optional<uint256>& expected_hash) const;
469 : : bool ReadBlock(CBlock& block, const CBlockIndex& index) const;
470 : : ReadRawBlockResult ReadRawBlock(const FlatFilePos& pos, std::optional<std::pair<size_t, size_t>> block_part = std::nullopt) const;
471 : :
472 : : bool ReadBlockUndo(CBlockUndo& blockundo, const CBlockIndex& index) const;
473 : :
474 : : void CleanupBlockRevFiles() const;
475 : : };
476 : :
477 : : // Calls ActivateBestChain() even if no blocks are imported.
478 : : void ImportBlocks(ChainstateManager& chainman, std::span<const fs::path> import_paths);
479 : : } // namespace node
480 : :
481 : : #endif // BITCOIN_NODE_BLOCKSTORAGE_H
|