1
0

wallet_db: add configvar for partial_writes, disable by default

Adds a new configvar `WALLET_PARTIAL_WRITES` to enable/disable partial writes for the walletDB.
This is a further restriction on top of the existing restrictions,
e.g. wallet files still need to have file encryption disabled for partial writes.
It defaults to off, so even for unencrypted wallets we disable partial writes for now.

This is used as a stopgap measure until we fix the issues found with the partial writes impl
(see https://github.com/spesmilo/electrum/issues/10000).
This commit is contained in:
SomberNight
2025-07-15 13:14:38 +00:00
parent 482d573f55
commit 85fc95c71b
7 changed files with 36 additions and 13 deletions

View File

@@ -687,6 +687,11 @@ class SimpleConfig(Logger):
This can eliminate a serious privacy issue where a malicious user can track your spends by sending small payments
to a previously-paid address of yours that would then be included with unrelated inputs in your future payments."""),
)
WALLET_PARTIAL_WRITES = ConfigVar(
'wallet_partial_writes', default=False, type_=bool,
long_desc=lambda: _("""Allows partial updates to be written to disk for the wallet DB.
If disabled, the full wallet file is written to disk for every change. Experimental."""),
)
FX_USE_EXCHANGE_RATE = ConfigVar('use_exchange_rate', default=False, type_=bool)
FX_CURRENCY = ConfigVar('currency', default='EUR', type_=str)