mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
wallet: add list of upgrades.
Useful for debugging a db. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -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
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user