Skip to content

Instantly share code, notes, and snippets.

@Sjors Sjors/bitcoin.conf
Created Aug 26, 2018

Embed
What would you like to do?
Bitcoin Core remote dev
testnet=1
[main]
[test]
server=1
rpcpassword=bitcoin
rpcuser=bitcoin
# This builds bitcoind on remote machine and starts it. It then forwards the RPC port so you use bitcoin-cli locally.
# Doesn't work with QT. Only works if remote and host architecture match (otherwise compile bitcoin-cli locally or cross compile it).
# Usage:
# * clone bitcoin into e.g. ~/dev-remote/bitcoin on the remote server
# * CONFIGURE=1 ../
# (set CONFIGURE=0 to skip ./autogen.sh and ./configure)
#!/bin/bash
set -ue
REMOTE_SERVER=remote-server
REMOTE_PATH=dev-remote/bitcoin
LOCAL=~/dev/bitcoind
HOST=x86_64-apple-darwin17.7.0
rsync -va $LOCAL/ $REMOTE_SERVER:$REMOTE_PATH --filter=':- .gitignore' \
--exclude .git \
--exclude build_msvc \
--exclude src/qt
if [ $CONFIGURE -eq "1" ]; then
ssh $REMOTE_SERVER "export PATH=$PATH:/usr/local/bin && cd $REMOTE_PATH && \
cd depends &&
NO_QT=1 make -j5 &&
./configure --prefix=`pwd`/depends/x86_64-apple-darwin17.7.0 --without-gui --disable-bench --with-miniupnpc=no"
fi
ssh $REMOTE_SERVER "export PATH=$PATH:/usr/local/bin && cd $REMOTE_PATH && \
make -j5"
rsync -av $REMOTE_SERVER:$REMOTE_PATH/src/bitcoin-cli ~/dev/bitcoind/src
ssh -t -L 18332:localhost:18332 $REMOTE_SERVER "cd $REMOTE_PATH && src/bitcoind"
ssh -t $REMOTE_SERVER "export PATH=$PATH:/usr/local/bin && cd $REMOTE_PATH && make check && test/functional/test_runner.py"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.