-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade MMGen to tag version btc_bch; mmlive-node-start,-stop changes
* mmlive-node-start: start BCH node with non-standard RPC ports (8442,18442) for seamless integration with MMGen scripts. * new command: mmlive-node-stop * upgrade MMGen to 'btc_bch' tag version supporting new --coin option and correct display of 'BCH' for BCH amounts.
- Loading branch information
Showing
5 changed files
with
71 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
PROGNAME=`basename $0` | ||
DESC='Bitcoin Core' | ||
|
||
while getopts hAet OPT | ||
do | ||
case "$OPT" in | ||
h) printf " %-16s Stop an MMGen bitcoind node\n" "${PROGNAME^^}:" | ||
echo " USAGE: $PROGNAME" | ||
echo " OPTIONS: '-h' Print this help message" | ||
echo " '-e' Stop a testnet node" | ||
echo " '-A' Stop the Bitcoin ABC hard-fork client" | ||
echo " '-t' Testing mode. Just print the command that would be executed" | ||
exit ;; | ||
A) ABC=1 DESC='Bitcoin ABC hard-fork (BCH)' PORT_ARG=' --rpcport=8442' ;; | ||
e) TESTNET=1 ADD_ARGS+=' --rpcconnect=127.0.0.1' PORT_ARG=' --rpcport=18332' ;; | ||
t) TESTING=1 ;; | ||
*) exit ;; | ||
esac | ||
done | ||
|
||
shift $((OPTIND-1)) | ||
|
||
[ "$TESTNET" -a "$ABC" ] && PORT_ARG=' --rpcport=18442' | ||
|
||
CMD="bitcoin-cli$ADD_ARGS$PORT_ARG stop" | ||
|
||
if [ "$TESTING" ]; then | ||
echo "Would execute: $CMD" | ||
else | ||
echo "Stopping the $DESC client!" | ||
eval $CMD | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
#:REV: 0.0.7o | ||
#:DESC: Upgrade MMGen to btc_bch tag version | ||
|
||
set -e | ||
|
||
function upgrade_mmgen { | ||
echo "Upgrading MMGen to version '$VER'" | ||
( | ||
cd /setup/git/MMGenLive/ | ||
eval "$BUILD_SYSTEM chroot_install_mmgen_user_at_commit 'IN_MMLIVE_SYSTEM=1' 'MMGEN_COMMIT=$VER'" | ||
) | ||
} | ||
|
||
VER='btc_bch' | ||
[ -d ~mmgen/src/mmgen-$VER ] || upgrade_mmgen | ||
|
||
exit 0 |