mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
In pegging.py test use sidechain binary in the same repo per default
This commit is contained in:
parent
28b20e406f
commit
dc23bee8d1
1 changed files with 12 additions and 7 deletions
|
|
@ -8,11 +8,16 @@ import time
|
||||||
import subprocess
|
import subprocess
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
if len(sys.argv) != 3:
|
if len(sys.argv) < 2:
|
||||||
print("paths to bitcoind and sidechain daemon must be included as arguments")
|
print("path to bitcoind must be included as argument")
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
print(sys.argv[1])
|
bitcoin_bin_path = sys.argv[1]
|
||||||
print(sys.argv[2])
|
sidechain_bin_path = os.path.normpath(os.path.dirname(os.path.realpath(__file__))+"/../../src")
|
||||||
|
if len(sys.argv) > 2:
|
||||||
|
sidechain_bin_path = sys.argv[2]
|
||||||
|
|
||||||
|
print(bitcoin_bin_path)
|
||||||
|
print(sidechain_bin_path)
|
||||||
|
|
||||||
# Sync mempool, make a block, sync blocks
|
# Sync mempool, make a block, sync blocks
|
||||||
def sync_all(sidechain, sidechain2):
|
def sync_all(sidechain, sidechain2):
|
||||||
|
|
@ -110,13 +115,13 @@ try:
|
||||||
|
|
||||||
# Start daemons
|
# Start daemons
|
||||||
print("Starting daemons at "+bitcoin_datadir+", "+sidechain_datadir+" and "+sidechain2_datadir)
|
print("Starting daemons at "+bitcoin_datadir+", "+sidechain_datadir+" and "+sidechain2_datadir)
|
||||||
bitcoindstart = sys.argv[1]+"/bitcoind -datadir="+bitcoin_datadir
|
bitcoindstart = bitcoin_bin_path+"/bitcoind -datadir="+bitcoin_datadir
|
||||||
subprocess.Popen(bitcoindstart.split(), stdout=subprocess.PIPE)
|
subprocess.Popen(bitcoindstart.split(), stdout=subprocess.PIPE)
|
||||||
|
|
||||||
sidechainstart = sys.argv[2]+"/elementsd -datadir="+sidechain_datadir + sidechain_args
|
sidechainstart = sidechain_bin_path+"/elementsd -datadir="+sidechain_datadir + sidechain_args
|
||||||
subprocess.Popen(sidechainstart.split(), stdout=subprocess.PIPE)
|
subprocess.Popen(sidechainstart.split(), stdout=subprocess.PIPE)
|
||||||
|
|
||||||
sidechain2start = sys.argv[2]+"/elementsd -datadir="+sidechain2_datadir + sidechain_args
|
sidechain2start = sidechain_bin_path+"/elementsd -datadir="+sidechain2_datadir + sidechain_args
|
||||||
subprocess.Popen(sidechain2start.split(), stdout=subprocess.PIPE)
|
subprocess.Popen(sidechain2start.split(), stdout=subprocess.PIPE)
|
||||||
|
|
||||||
print("Daemons started")
|
print("Daemons started")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue