wallet: add list of upgrades.

Useful for debugging a db.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-02-17 15:11:08 +10:30
parent 097b9345eb
commit d47d85fa30
4 changed files with 45 additions and 2 deletions

View File

@@ -365,6 +365,16 @@ class LightningNode(object):
db.close()
return result
# Assumes node is stopped!
def db_manip(self, query):
db = sqlite3.connect(os.path.join(self.daemon.lightning_dir, "lightningd.sqlite3"))
db.row_factory = sqlite3.Row
c = db.cursor()
c.execute(query)
db.commit()
c.close()
db.close()
def stop(self, timeout=10):
""" Attempt to do a clean shutdown, but kill if it hangs
"""