From 4a9df896ad2690924af4df8db82f86f19114ebba Mon Sep 17 00:00:00 2001 From: Michael Schmoock Date: Mon, 1 Feb 2021 14:02:11 +0100 Subject: [PATCH] backup: fix deadlock by removing the sqlite3 check I commented out that check and placed a NOTE that future developers to see upfront putting in RPC stuff in init is potentially bad. --- backup/backup.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/backup/backup.py b/backup/backup.py index 0e684d6..85b6687 100755 --- a/backup/backup.py +++ b/backup/backup.py @@ -443,9 +443,12 @@ def on_init(options, **kwargs): level="warn" ) - configs = plugin.rpc.listconfigs() - if not configs['wallet'].startswith('sqlite3'): - kill("The backup plugin only works with the sqlite3 database.") + # IMPORTANT NOTE + # Putting RPC stuff in init() like the following can cause deadlocks! + # See: https://github.com/lightningd/plugins/issues/209 + #configs = plugin.rpc.listconfigs() + #if not configs['wallet'].startswith('sqlite3'): + # kill("The backup plugin only works with the sqlite3 database.") def kill(message: str):