mirror of
https://github.com/LORDBABUINO/stealth.git
synced 2026-04-30 09:29:59 -07:00
fix: pass datadir to bitcoin-cli so Python scripts find cookie auth
setup.sh starts bitcoind with -datadir=bitcoin-data, but bitcoin_rpc.py was calling bitcoin-cli without it, so it looked in ~/.bitcoin for the auth cookie and failed with "Incorrect rpcuser or rpcpassword". Add datadir config to config.ini and resolve it in _build_base_args().
This commit is contained in:
@@ -22,6 +22,13 @@ def _build_base_args(section):
|
||||
|
||||
args = [cli_bin]
|
||||
|
||||
# Datadir — resolve relative paths from this file's directory
|
||||
datadir = section.get("datadir", "").strip()
|
||||
if datadir:
|
||||
if not os.path.isabs(datadir):
|
||||
datadir = os.path.join(os.path.dirname(os.path.abspath(__file__)), datadir)
|
||||
args.append(f"-datadir={datadir}")
|
||||
|
||||
network_flags = {
|
||||
"regtest": "-regtest",
|
||||
"testnet": "-testnet",
|
||||
|
||||
Reference in New Issue
Block a user