Reorganize repo: move scripts to contrib/scripts/, clean up .gitignore, untrack backup files
This commit is contained in:
30
contrib/scripts/smartchains
Executable file
30
contrib/scripts/smartchains
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2018-2024 The Hush developers
|
||||
set -eo pipefail
|
||||
|
||||
# Resolve binary directory
|
||||
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
if [ -f "$SCRIPTDIR/hush-cli" ] || [ -f "$SCRIPTDIR/hushd" ]; then
|
||||
BINDIR="$SCRIPTDIR"
|
||||
else
|
||||
BINDIR="$SCRIPTDIR/../../src"
|
||||
fi
|
||||
cd "$BINDIR"
|
||||
|
||||
# You can now add delay line to pubkey.txt file
|
||||
source pubkey.txt
|
||||
override_args="$@"
|
||||
seed_ip=$(SEEDNODE)
|
||||
hsc='./hush-arrakis-chain'
|
||||
|
||||
if [ -z "$delay" ]; then delay=20; fi
|
||||
|
||||
"$SCRIPTDIR/listassetchainparams" | while read args; do
|
||||
gen=""
|
||||
if [ $[RANDOM % 10] == 1 ]; then
|
||||
gen=" -gen -genproclimit=1"
|
||||
fi
|
||||
|
||||
$hsc $gen $args $overide_args -pubkey=$pubkey -addnode=$seed_ip &
|
||||
sleep $delay
|
||||
done
|
||||
Reference in New Issue
Block a user