StoredDict: use pointers instead of path
Instead of storing its own path, each StoredDict element stores its own key and a pointer to its parent. If a dict is removed from the db, its parent pointer is set to None. This makes self.path return None for all branches that have been pruned. This passes tests/tests_json_db.py and fixes issue #10000
This commit is contained in:
@@ -773,7 +773,7 @@ class Channel(AbstractChannel):
|
||||
Logger.__init__(self) # should be after short_channel_id is set
|
||||
self.lnworker = lnworker
|
||||
self.storage = state
|
||||
self.db_lock = self.storage.db.lock if self.storage.db else threading.RLock()
|
||||
self.db_lock = self.storage.lock
|
||||
self.config = {}
|
||||
self.config[LOCAL] = state["local_config"]
|
||||
self.config[REMOTE] = state["remote_config"]
|
||||
|
||||
Reference in New Issue
Block a user