test: Wrap validation functions with TestChainstateManager

This allows to access them in the fuzz test in the next commit
without making them public.

Co-authored-by: TheCharlatan <seb.kung@gmail.com>
This commit is contained in:
Martin Zumsande
2025-12-05 11:42:30 -05:00
parent 13891a8a68
commit c011e3aa54
4 changed files with 73 additions and 8 deletions

View File

@@ -248,7 +248,6 @@ private:
ChainstateManager& chainman);
RecursiveMutex cs_LastBlockFile;
std::vector<CBlockFileInfo> m_blockfile_info;
//! Since assumedvalid chainstates may be syncing a range of the chain that is very
//! far away from the normal/background validation process, we should segment blockfiles
@@ -283,12 +282,6 @@ private:
const Obfuscation m_obfuscation;
/** Dirty block index entries. */
std::set<CBlockIndex*> m_dirty_blockindex;
/** Dirty block file entries. */
std::set<int> m_dirty_fileinfo;
/**
* Map from external index name to oldest block that must not be pruned.
*
@@ -304,6 +297,15 @@ private:
const FlatFileSeq m_block_file_seq;
const FlatFileSeq m_undo_file_seq;
protected:
std::vector<CBlockFileInfo> m_blockfile_info;
/** Dirty block index entries. */
std::set<CBlockIndex*> m_dirty_blockindex;
/** Dirty block file entries. */
std::set<int> m_dirty_fileinfo;
public:
using Options = kernel::BlockManagerOpts;
using ReadRawBlockResult = util::Expected<std::vector<std::byte>, ReadRawError>;