1
0

Move get_dict method from wallet_db to json_db.

Define overloaded methods: _convert_dict _convert_values
This commit is contained in:
ThomasV
2022-11-03 12:39:36 +01:00
parent 99b2970372
commit 015648c4e5
2 changed files with 14 additions and 8 deletions

View File

@@ -1337,14 +1337,6 @@ class WalletDB(JsonDB):
assert isinstance(txid, str)
self.tx_fees.pop(txid, None)
@locked
def get_dict(self, name) -> dict:
# Warning: interacts un-intuitively with 'put': certain parts
# of 'data' will have pointers saved as separate variables.
if name not in self.data:
self.data[name] = {}
return self.data[name]
@locked
def num_change_addresses(self) -> int:
return len(self.change_addresses)