mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
pyln: Set the bitcoin datadir when running tests
Telling `lightningd` to pass a `-datadir` to `bitcoin-cli` so it doesn't go snooping where it doesn't belong (i.e., the user's home directory and config). Changelog-None Suggested-by: Simon Vrouwe <@SimonVrouwe> Signed-off-by: Christian Decker <@cdecker>
This commit is contained in:
committed by
Rusty Russell
parent
9bfdf234f3
commit
7b752e00d5
@@ -489,6 +489,9 @@ class LightningD(TailableProc):
|
|||||||
'ignore-fee-limits': 'false',
|
'ignore-fee-limits': 'false',
|
||||||
'bitcoin-rpcuser': BITCOIND_CONFIG['rpcuser'],
|
'bitcoin-rpcuser': BITCOIND_CONFIG['rpcuser'],
|
||||||
'bitcoin-rpcpassword': BITCOIND_CONFIG['rpcpassword'],
|
'bitcoin-rpcpassword': BITCOIND_CONFIG['rpcpassword'],
|
||||||
|
|
||||||
|
# Make sure we don't touch any existing config files in the user's $HOME
|
||||||
|
'bitcoin-datadir': lightning_dir,
|
||||||
}
|
}
|
||||||
|
|
||||||
for k, v in opts.items():
|
for k, v in opts.items():
|
||||||
|
|||||||
@@ -33,5 +33,6 @@ def getchaininfo(plugin, **kwargs):
|
|||||||
plugin.add_option("bitcoin-rpcuser", "", "")
|
plugin.add_option("bitcoin-rpcuser", "", "")
|
||||||
plugin.add_option("bitcoin-rpcpassword", "", "")
|
plugin.add_option("bitcoin-rpcpassword", "", "")
|
||||||
plugin.add_option("bitcoin-rpcport", "", "")
|
plugin.add_option("bitcoin-rpcport", "", "")
|
||||||
|
plugin.add_option("bitcoin-datadir", "", "")
|
||||||
|
|
||||||
plugin.run()
|
plugin.run()
|
||||||
|
|||||||
Reference in New Issue
Block a user