@@ -818,13 +818,13 @@ void BlockManager::UnlinkPrunedFiles(const std::set<int>& setFilesToPrune) const
818
818
819
819
AutoFile BlockManager::OpenBlockFile (const FlatFilePos& pos, bool fReadOnly ) const
820
820
{
821
- return AutoFile{m_block_file_seq.Open (pos, fReadOnly )};
821
+ return AutoFile{m_block_file_seq.Open (pos, fReadOnly ), m_xor_key };
822
822
}
823
823
824
824
/* * Open an undo file (rev?????.dat) */
825
825
AutoFile BlockManager::OpenUndoFile (const FlatFilePos& pos, bool fReadOnly ) const
826
826
{
827
- return AutoFile{m_undo_file_seq.Open (pos, fReadOnly )};
827
+ return AutoFile{m_undo_file_seq.Open (pos, fReadOnly ), m_xor_key };
828
828
}
829
829
830
830
fs::path BlockManager::GetBlockPosFilename (const FlatFilePos& pos) const
@@ -1144,6 +1144,14 @@ FlatFilePos BlockManager::SaveBlockToDisk(const CBlock& block, int nHeight)
1144
1144
return blockPos;
1145
1145
}
1146
1146
1147
+ BlockManager::BlockManager (const util::SignalInterrupt& interrupt, Options opts)
1148
+ : m_prune_mode{opts.prune_target > 0 },
1149
+ m_xor_key{},
1150
+ m_opts{std::move (opts)},
1151
+ m_block_file_seq{FlatFileSeq{m_opts.blocks_dir , " blk" , m_opts.fast_prune ? 0x4000 /* 16kB */ : BLOCKFILE_CHUNK_SIZE}},
1152
+ m_undo_file_seq{FlatFileSeq{m_opts.blocks_dir , " rev" , UNDOFILE_CHUNK_SIZE}},
1153
+ m_interrupt{interrupt} {}
1154
+
1147
1155
class ImportingNow
1148
1156
{
1149
1157
std::atomic<bool >& m_importing;
0 commit comments