mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
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:
@@ -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