From fa6b053b5c964fb35935fa994cb782c0731a56f8 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Thu, 3 Aug 2023 11:48:34 +0200 Subject: mempool: persist with XOR --- src/streams.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/streams.h') diff --git a/src/streams.h b/src/streams.h index d58de5233b..fe5df72abe 100644 --- a/src/streams.h +++ b/src/streams.h @@ -471,7 +471,7 @@ class AutoFile { protected: std::FILE* m_file; - const std::vector m_xor; + std::vector m_xor; public: explicit AutoFile(std::FILE* file, std::vector 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 data_xor) { m_xor = data_xor; } + /** Implementation detail, only used internally. */ std::size_t detail_fread(Span dst); -- cgit v1.2.3