Skip to content
This repository has been archived by the owner on Apr 2, 2019. It is now read-only.

Commit

Permalink
Updated a few more things to BitcoinZ
Browse files Browse the repository at this point in the history
  • Loading branch information
renuzit committed Jun 6, 2018
1 parent 71701cb commit fe1eb60
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 62 deletions.
20 changes: 10 additions & 10 deletions zcutil/votecoin_build_debian.sh → zcutil/bitcoinz_build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ sudo apt-get install \

./build.sh --disable-tests --disable-rust -j$(nproc) || exit 1

if [ ! -r ~/.votecoin/votecoin.conf ]; then
mkdir -p ~/.votecoin
echo "addnode=mainnet.votecoin.site" >~/.votecoin/votecoin.conf
echo "rpcuser=username" >>~/.votecoin/votecoin.conf
echo "rpcpassword=`head -c 32 /dev/urandom | base64`" >>~/.votecoin/votecoin.conf
if [ ! -r ~/.bitcoinz/bitcoinz.conf ]; then
mkdir -p ~/.bitcoinz
echo "addnode=mainnet.bitcoinz.site" >~/.bitcoinz/bitcoinz.conf
echo "rpcuser=username" >>~/.bitcoinz/bitcoinz.conf
echo "rpcpassword=`head -c 32 /dev/urandom | base64`" >>~/.bitcoinz/bitcoinz.conf
fi

cd ../src/
cp -f zcashd votecoind
cp -f zcash-cli votecoin-cli
cp -f zcash-tx votecoin-tx
cp -f zcashd bitcoinzd
cp -f zcash-cli bitcoinz-cli
cp -f zcash-tx bitcoinz-tx

echo ""
echo "--------------------------------------------------------------------------"
echo "Compilation complete. Now you can run ./src/votecoind to start the daemon."
echo "It will use configuration file from ~/.votecoin/votecoin.conf"
echo "Compilation complete. Now you can run ./src/bitcoinzd to start the daemon."
echo "It will use configuration file from ~/.bitcoinz/bitcoinz.conf"
echo ""
31 changes: 31 additions & 0 deletions zcutil/bitcoinz_build_fedora.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash

# actually untested, sorry

cd "$(dirname "$(readlink -f "$0")")" #'"%#@!

sudo dnf install \
git pkgconfig automake autoconf ncurses-devel python \
python-zmq wget gtest-devel gcc gcc-c++ libtool patch

./fetch-params.sh || exit 1

./build.sh --disable-tests --disable-rust -j$(nproc) || exit 1

if [ ! -r ~/.bitcoinz/bitcoinz.conf ]; then
mkdir -p ~/.bitcoinz
echo "addnode=mainnet.bitcoinz.site" >~/.bitcoinz/bitcoinz.conf
echo "rpcuser=username" >>~/.bitcoinz/bitcoinz.conf
echo "rpcpassword=`head -c 32 /dev/urandom | base64`" >>~/.bitcoinz/bitcoinz.conf
fi

cd ../src/
cp -f zcashd bitcoinzd
cp -f zcash-cli bitcoinz-cli
cp -f zcash-tx bitcoinz-tx

echo ""
echo "--------------------------------------------------------------------------"
echo "Compilation complete. Now you can run ./src/bitcoinzd to start the daemon."
echo "It will use configuration file from ~/.bitcoinz/bitcoinz.conf"
echo ""
22 changes: 11 additions & 11 deletions zcutil/vot → zcutil/btcz
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ TMP=/tmp
help()
{
echo ""
echo "Helper script to make VoteCoin operations easier"
echo "Helper script to make BitcoinZ operations easier"
echo "Supported syntax:"
echo ""
echo " $0 addr"
Expand All @@ -21,44 +21,44 @@ help()


if [ "$1" = "addr" ]; then
votecoin-cli getnewaddress
bitcoinz-cli getnewaddress
exit
fi


if [ "$1" = "zaddr" ]; then
votecoin-cli z_getnewaddress
bitcoinz-cli z_getnewaddress
exit
fi


if [ "$1" = "send" ]; then
votecoin-cli z_sendmany $2 '[{"address": "'$3'", "amount": '$4'}]' 1 0
bitcoinz-cli z_sendmany $2 '[{"address": "'$3'", "amount": '$4'}]' 1 0
exit
fi


if [ "$1" = "sendto" ]; then
votecoin-cli sendtoaddress $2 $3
bitcoinz-cli sendtoaddress $2 $3
exit
fi


if [ "$1" = "status" ]; then
votecoin-cli z_getoperationresult
bitcoinz-cli z_getoperationresult
exit
fi


if [ "$1" = "totals" ]; then
votecoin-cli z_gettotalbalance
bitcoinz-cli z_gettotalbalance
exit
fi


if [ "$1" = "export" ]; then
EXP=exportfilename$$
votecoin-cli z_exportwallet $EXP
bitcoinz-cli z_exportwallet $EXP
cat $TMP/$EXP
rm -f $TMP/$EXP
exit
Expand All @@ -67,16 +67,16 @@ fi

if [ "$1" = "list" ]; then
EXP=exportfilename$$
votecoin-cli z_exportwallet $EXP
bitcoinz-cli z_exportwallet $EXP

cat $TMP/$EXP | cut -d = -f 3 | grep "^t1" | while read LINE; do
echo -ne $LINE" "
votecoin-cli z_getbalance $LINE
bitcoinz-cli z_getbalance $LINE
done | fgrep -v " 0.000000"

cat $TMP/$EXP | cut -d = -f 2 | grep "^z" | while read LINE; do
echo -ne $LINE" "
votecoin-cli z_getbalance $LINE
bitcoinz-cli z_getbalance $LINE
done | fgrep -v " 0.000000"

rm -f $TMP/$EXP >/dev/null
Expand Down
14 changes: 7 additions & 7 deletions zcutil/vot.bat → zcutil/btcz.bat
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
@echo off

if "%1" == "addr" (
votecoin-cli getnewaddress
bitcoinz-cli getnewaddress
goto exit
)


if "%1" == "zaddr" (
votecoin-cli z_getnewaddress
bitcoinz-cli z_getnewaddress
goto exit
)


if "%1" == "send" (
votecoin-cli z_sendmany %2 "[{\"address\": \"%3\", \"amount\": %4}]" 1 0
bitcoinz-cli z_sendmany %2 "[{\"address\": \"%3\", \"amount\": %4}]" 1 0
goto exit
)



if "%1" == "sendto" (
votecoin-cli sendtoaddress %2 %3
bitcoinz-cli sendtoaddress %2 %3
goto exit
)


if "%1" == "status" (
votecoin-cli z_getoperationresult
bitcoinz-cli z_getoperationresult
goto exit
)


if "%1" == "totals" (
votecoin-cli z_gettotalbalance
bitcoinz-cli z_gettotalbalance
goto exit
)

Expand All @@ -43,7 +43,7 @@ if "%1" == "totals" (
echo.
echo ------------------------------------------------------------------------
echo This is helper script to make VoteCoin operations easier.
echo Make sure votecoind.exe is running so we can communicate with it.
echo Make sure bitcoinzd.exe is running so we can communicate with it.
echo Supported commands:
echo.
echo vot addr ... generate new T address
Expand Down
6 changes: 3 additions & 3 deletions zcutil/build-win.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ sed -i 's/-lboost_system-mt /-lboost_system-mt-s /' configure
CC="${CC}" CXX="${CXX}" make V=1

cd src
cp -f zcashd.exe votecoind.exe
cp -f zcash-cli.exe votecoin-cli.exe
cp -f zcash-tx.exe votecoin-tx.exe
cp -f zcashd.exe bitcoinzd.exe
cp -f zcash-cli.exe bitcoinz-cli.exe
cp -f zcash-tx.exe bitcoinz-tx.exe
cd ..
31 changes: 0 additions & 31 deletions zcutil/votecoin_build_fedora.sh

This file was deleted.

0 comments on commit fe1eb60

Please sign in to comment.