tests: Check that the last hardened cache upgrade occurs
When loading an older wallet without the last hardened cache, an automatic upgrade should be performed. Check this in wallet_backwards_compatibility.py When migrating a wallet, the migrated wallet should always have the last hardened cache, so verify in wallet_migration.py
This commit is contained in:
1 parent
00604296e1
commit
8a08eef645
3 files changed
+66
-14
No files matched your search
@@ -1082,3 +1082,15 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
||||
if self.options.usecli:
|
||||
return json.dumps(text)
|
||||
return text
|
||||
|
||||
def inspect_sqlite_db(self, path, fn, *args, **kwargs):
|
||||
try:
|
||||
import sqlite3 # type: ignore[import]
|
||||
conn = sqlite3.connect(path)
|
||||
with conn:
|
||||
result = fn(conn, *args, **kwargs)
|
||||
conn.close()
|
||||
return result
|
||||
except ImportError:
|
||||
self.log.warning("sqlite3 module not available, skipping tests that inspect the database")
|
||||
|
||||
Reference in new issue
Block a user