1
0

Merge pull request #8843 from SomberNight/202401_jsondb_set

walletdb: change structure of prevouts_by_scripthash, and db upgrade
This commit is contained in:
ThomasV
2024-01-31 12:56:11 +01:00
committed by GitHub
3 changed files with 61 additions and 9 deletions

View File

@@ -159,6 +159,9 @@ class StoredDict(dict):
# convert lists
if isinstance(v, list):
v = StoredList(v, self.db, self.path + [key])
# reject sets. they do not work well with jsonpatch
if isinstance(v, set):
raise Exception(f"Do not store sets inside jsondb. path={self.path!r}")
# set item
dict.__setitem__(self, key, v)
if self.db and patch: