mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
refactor: rename OBFUSCATION_KEY_KEY
See: https://github.com/bitcoin/bitcoin/pull/31144#discussion_r2216425882 Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
This commit is contained in:
@@ -250,10 +250,10 @@ CDBWrapper::CDBWrapper(const DBParams& params)
|
||||
}
|
||||
|
||||
assert(!m_obfuscation); // Needed for unobfuscated Read()/Write() below
|
||||
if (!Read(OBFUSCATION_KEY_KEY, m_obfuscation) && params.obfuscate && IsEmpty()) {
|
||||
if (!Read(OBFUSCATION_KEY, m_obfuscation) && params.obfuscate && IsEmpty()) {
|
||||
// Generate, write and read back the new obfuscation key, making sure we don't obfuscate the key itself
|
||||
Write(OBFUSCATION_KEY_KEY, FastRandomContext{}.randbytes(Obfuscation::KEY_SIZE));
|
||||
Read(OBFUSCATION_KEY_KEY, m_obfuscation);
|
||||
Write(OBFUSCATION_KEY, FastRandomContext{}.randbytes(Obfuscation::KEY_SIZE));
|
||||
Read(OBFUSCATION_KEY, m_obfuscation);
|
||||
LogInfo("Wrote new obfuscation key for %s: %s", fs::PathToString(params.path), m_obfuscation.HexKey());
|
||||
}
|
||||
LogInfo("Using obfuscation key for %s: %s", fs::PathToString(params.path), m_obfuscation.HexKey());
|
||||
|
||||
Reference in New Issue
Block a user