mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-23 13:29:43 +02:00
test, contrib: Fix signer/miner command line escaping
Pass bitcoin binary command lines from test framework to signet/miner utility using shell escaping so they are unambigous and don't get mangled if they contain spaces. This change is not needed for tests to pass currently, but is a useful change to avoid CI failures in followup PR https://github.com/bitcoin/bitcoin/pull/31375 and to avoid other bugs.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
"""Test signet miner tool"""
|
||||
|
||||
import os.path
|
||||
import shlex
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
@@ -54,10 +55,10 @@ class SignetMinerTest(BitcoinTestFramework):
|
||||
subprocess.run([
|
||||
sys.executable,
|
||||
signet_miner_path,
|
||||
f'--cli={" ".join(rpc_argv)}',
|
||||
f'--cli={shlex.join(rpc_argv)}',
|
||||
'generate',
|
||||
f'--address={node.getnewaddress()}',
|
||||
f'--grind-cmd={" ".join(util_argv)}',
|
||||
f'--grind-cmd={shlex.join(util_argv)}',
|
||||
f'--nbits={DIFF_1_N_BITS:08x}',
|
||||
f'--set-block-time={int(time.time())}',
|
||||
'--poolnum=99',
|
||||
|
||||
Reference in New Issue
Block a user