1
0

plugins: structure plugin storage in wallet

store all plugin data by plugin name in a root dictionary `plugin_data`
inside the wallet db so that plugin data can get deleted again.
Prunes the data of plugins from the wallet db on wallet stop if the
plugin is not installed anymore.
This commit is contained in:
f321x
2025-05-05 18:16:29 +02:00
parent f25ddbc8f9
commit e80551192b
9 changed files with 47 additions and 23 deletions

View File

@@ -189,6 +189,11 @@ class StoredDict(dict):
self.db.add_patch({'op': 'remove', 'path': key_path(self.path, key)})
return r
def setdefault(self, key, default = None, /):
if key not in self:
self.__setitem__(key, default)
return self[key]
class StoredList(list):