mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-04 17:52:25 +01:00
scripted-diff: Use wallets_path and chain_path where possible
Instead of passing the datadir and chain name to os.path.join, just use the existing properties, which are the same. -BEGIN VERIFY SCRIPT- sed -i --regexp-extended 's|\.datadir, self\.chain, .wallets.|.wallets_path|g' $(git grep -l '\.datadir, self\.chain,') sed -i --regexp-extended 's|\.datadir, self\.chain,|.chain_path,|g' $(git grep -l '\.datadir, self\.chain,') -END VERIFY SCRIPT-
This commit is contained in:
@@ -234,7 +234,7 @@ class WalletDescriptorTest(BitcoinTestFramework):
|
||||
self.log.info("Test that loading descriptor wallet containing legacy key types throws error")
|
||||
self.nodes[0].createwallet(wallet_name="crashme", descriptors=True)
|
||||
self.nodes[0].unloadwallet("crashme")
|
||||
wallet_db = os.path.join(self.nodes[0].datadir, self.chain, "wallets", "crashme", self.wallet_data_filename)
|
||||
wallet_db = os.path.join(self.nodes[0].wallets_path, "crashme", self.wallet_data_filename)
|
||||
with sqlite3.connect(wallet_db) as conn:
|
||||
# add "cscript" entry: key type is uint160 (20 bytes), value type is CScript (zero-length here)
|
||||
conn.execute('INSERT INTO main VALUES(?, ?)', (b'\x07cscript' + b'\x00'*20, b'\x00'))
|
||||
|
||||
Reference in New Issue
Block a user