Asher Dawes
6 years ago
committed by
GitHub
11 changed files with 198 additions and 94 deletions
@ -1,4 +1,4 @@ |
|||
#!/bin/bash |
|||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
|||
cd $DIR |
|||
komodod -ac_name=VRSC -ac_algo=verushash -ac_cc=1 -ac_supply=0 -ac_eras=3 -ac_reward=0,38400000000,2400000000 -ac_halving=1,43200,1051920 -ac_decay=100000000,0,0 -ac_end=10080,226080,0 -addnode=185.25.48.236 -addnode=185.64.105.111 -ac_timelockgte=19200000000 -ac_timeunlockfrom=129600 -ac_timeunlockto=1180800 -ac_veruspos=50 -gen -genproclimit=0 "$@" |
|||
./komodod -ac_name=VRSC -ac_algo=verushash -ac_cc=1 -ac_supply=0 -ac_eras=3 -ac_reward=0,38400000000,2400000000 -ac_halving=1,43200,1051920 -ac_decay=100000000,0,0 -ac_end=10080,226080,0 -addnode=185.25.48.236 -addnode=185.64.105.111 -ac_timelockgte=19200000000 -ac_timeunlockfrom=129600 -ac_timeunlockto=1180800 -ac_veruspos=50 -gen -genproclimit=0 "$@" |
|||
|
@ -1,35 +0,0 @@ |
|||
#!/bin/sh |
|||
|
|||
TMP_DIR=~/tmp/komodo |
|||
|
|||
# make a tmp directory |
|||
mkdir -p $TMP_DIR |
|||
echo "making $TMP_DIR" |
|||
|
|||
binaries=("komodo-cli" "komodod") |
|||
|
|||
for binary in "${binaries[@]}"; |
|||
do |
|||
echo "copying $binary to $TMP_DIR" |
|||
|
|||
cp src/$binary $TMP_DIR |
|||
|
|||
# find the dylibs to copy for komodod |
|||
DYLIBS=`otool -L $TMP_DIR/$binary | grep "/usr/local" | awk -F' ' '{ print $1 }'` |
|||
echo "copying $DYLIBS to $TMP_DIR" |
|||
|
|||
# copy the dylibs to the tmpdir |
|||
for dylib in $DYLIBS; do cp -rf $dylib $TMP_DIR/; done |
|||
|
|||
# modify komodod to point to dylibs |
|||
echo "modifying $binary to use local libraries" |
|||
for dylib in $DYLIBS; do install_name_tool -change $dylib @executable_path/`basename $dylib` $TMP_DIR/$binary; done; |
|||
done |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
@ -1,5 +1,8 @@ |
|||
#!/bin/sh |
|||
|
|||
cp src/komodod src/komodo-cli kmd/linux/verus-cli |
|||
chmod +x kmd/linux/verus-cli/komodo* |
|||
chmod +x kmd/linux/verus-cli/veru* |
|||
chmod +x kmd/linux/verus-cli/komodo |
|||
chmod +x kmd/linux/verus-cli/komodod |
|||
chmod +x kmd/linux/verus-cli/verus |
|||
chmod +x kmd/linux/verus-cli/verusd |
|||
chmod +x kmd/linux/verus-cli/fetch-params |
|||
|
@ -0,0 +1,39 @@ |
|||
from subprocess import Popen, check_output, call |
|||
from time import sleep |
|||
from os import environ, path |
|||
|
|||
daemon_wrapper = "verusd" |
|||
cli_wrapper = "verus" |
|||
daemon_runtime_seconds = 600 |
|||
cli_commands = ["getblockchaininfo", "getmininginfo", "getwalletinfo", "stop"] |
|||
|
|||
|
|||
def start_daemon(daemon_wrapper): |
|||
try: |
|||
Popen(daemon_wrapper, shell=True, close_fds=True) |
|||
except: |
|||
exit(1) |
|||
|
|||
|
|||
def fetch_zcash_params(): |
|||
try: |
|||
call("fetch-params", shell=True) |
|||
except: |
|||
exit(1) |
|||
|
|||
|
|||
def run_cli_commands(cli_wrapper, commands): |
|||
for command in commands: |
|||
command = "%(cli_wrapper)s %(command)s" % locals() |
|||
try: |
|||
with open(path.join(environ["CI_PROJECT_DIR"], "log.txt"), "a") as log: |
|||
command_output = check_output(command, shell=True) |
|||
log.write("%(command_output)s\n" % locals()) |
|||
except: |
|||
exit(1) |
|||
|
|||
|
|||
fetch_zcash_params() |
|||
start_daemon(daemon_wrapper) |
|||
sleep(daemon_runtime_seconds) |
|||
run_cli_commands(cli_wrapper, cli_commands) |
Loading…
Reference in new issue