-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] Use bitcoindevkit/electrs base image for electrum tests
- Loading branch information
1 parent
aea9abf
commit 98803b2
Showing
2 changed files
with
15 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,17 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -e | ||
echo "Starting bitcoin node." | ||
/root/bitcoind -regtest -server -daemon -fallbackfee=0.0002 -rpcuser=admin -rpcpassword=passw -rpcallowip=0.0.0.0/0 -rpcbind=0.0.0.0 | ||
|
||
BITCOIN_VERSION=0.20.1 | ||
|
||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - || exit 1 | ||
sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-10 main" || exit 1 | ||
sudo apt-get update || exit 1 | ||
sudo apt-get install -y libllvm10 clang-10 libclang-common-10-dev || exit 1 | ||
|
||
cargo install --git https://github.com/romanz/electrs --bin electrs | ||
|
||
curl -O -L https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/bitcoin-$BITCOIN_VERSION-x86_64-linux-gnu.tar.gz | ||
tar xf bitcoin-$BITCOIN_VERSION-x86_64-linux-gnu.tar.gz | ||
|
||
export PATH=$PATH:./bitcoin-$BITCOIN_VERSION/bin | ||
|
||
bitcoind -regtest=1 -daemon=1 -fallbackfee=0.0002 | ||
until bitcoin-cli -regtest getblockchaininfo; do | ||
echo "Waiting for bitcoin node." | ||
until /root/bitcoin-cli -regtest -rpcuser=admin -rpcpassword=passw getblockchaininfo; do | ||
sleep 1 | ||
done | ||
|
||
ADDR=$(bitcoin-cli -regtest getnewaddress) | ||
bitcoin-cli -regtest generatetoaddress 150 $ADDR | ||
echo "Generating 150 bitcoin blocks." | ||
ADDR=$(/root/bitcoin-cli -regtest -rpcuser=admin -rpcpassword=passw getnewaddress) | ||
/root/bitcoin-cli -regtest -rpcuser=admin -rpcpassword=passw generatetoaddress 150 $ADDR | ||
|
||
nohup electrs --network regtest --jsonrpc-import --cookie-file $HOME/.bitcoin/regtest/.cookie & | ||
echo "Starting electrs node." | ||
nohup /root/electrs --network regtest --jsonrpc-import & | ||
sleep 5 |