diff --git a/tests/test_runes.py b/tests/test_runes.py index 70ce99f6b..e006f9644 100644 --- a/tests/test_runes.py +++ b/tests/test_runes.py @@ -438,7 +438,7 @@ def test_commando_rune_migration(node_factory): l1.daemon.wait_for_logs(['Transferring commando rune to db: '] * 2) # datastore should be empty: - assert l1.rpc.listdatastore(['commando', 'runes']) == {'datastore': []} + assert l1.rpc.listdatastore(['commando']) == {'datastore': []} # Should match commando results! assert l1.rpc.showrunes() == {'runes': [{'rune': @@ -463,7 +463,7 @@ def test_commando_blacklist_migration(node_factory): l1.daemon.wait_for_logs(['Transferring commando blacklist to db: '] * 2) # datastore should be empty: - assert l1.rpc.listdatastore(['commando', 'blacklist']) == {'datastore': []} + assert l1.rpc.listdatastore(['commando']) == {'datastore': []} # Should match commando results! assert l1.rpc.blacklistrune() == {'blacklist': [{'start': 0, 'end': 6}, diff --git a/wallet/wallet.c b/wallet/wallet.c index 5e6f0226b..d73865fe7 100644 --- a/wallet/wallet.c +++ b/wallet/wallet.c @@ -5722,4 +5722,10 @@ void migrate_datastore_commando_runes(struct lightningd *ld, struct db *db) db_insert_blacklist(db, &b); } db_datastore_remove(db, startkey); + + /* Might as well clean up "rune_counter" while we're here, so + * commando datastore is completely clean. */ + startkey[0] = "commando"; + startkey[1] = "rune_counter"; + db_datastore_remove(db, startkey); }