mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
mempool: persist with XOR
This commit is contained in:
@@ -471,7 +471,7 @@ class AutoFile
|
||||
{
|
||||
protected:
|
||||
std::FILE* m_file;
|
||||
const std::vector<std::byte> m_xor;
|
||||
std::vector<std::byte> m_xor;
|
||||
|
||||
public:
|
||||
explicit AutoFile(std::FILE* file, std::vector<std::byte> data_xor={}) : m_file{file}, m_xor{std::move(data_xor)} {}
|
||||
@@ -511,6 +511,9 @@ public:
|
||||
*/
|
||||
bool IsNull() const { return m_file == nullptr; }
|
||||
|
||||
/** Continue with a different XOR key */
|
||||
void SetXor(std::vector<std::byte> data_xor) { m_xor = data_xor; }
|
||||
|
||||
/** Implementation detail, only used internally. */
|
||||
std::size_t detail_fread(Span<std::byte> dst);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user