Restructure wallet storage:
- Perform json deserializations in wallet_db - use StoredDict class that keeps tracks of its modifications
This commit is contained in:
@@ -280,6 +280,8 @@ class MyEncoder(json.JSONEncoder):
|
||||
return obj.isoformat(' ')[:-3]
|
||||
if isinstance(obj, set):
|
||||
return list(obj)
|
||||
if isinstance(obj, bytes): # for nametuples in lnchannel
|
||||
return obj.hex()
|
||||
if hasattr(obj, 'to_json') and callable(obj.to_json):
|
||||
return obj.to_json()
|
||||
return super(MyEncoder, self).default(obj)
|
||||
|
||||
Reference in New Issue
Block a user