mirror of
https://github.com/aljazceru/cyphernode.git
synced 2025-12-28 01:55:14 +01:00
Monitoring volume fix
This commit is contained in:
122
build0.sh
122
build0.sh
@@ -1,122 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
a=$(curl -s --config /tmp/watcher_btcnode_curlcfg.properties -H "Content-Type: application/json" -d '{"method":"echo"}' bitcoin:18332/wallet/watching01.dat | jq -e ".error") ; [ "$?" -ne "0" ] && echo "ready"
|
||||
|
||||
curl -d '{"method":"echo"}' bitcoin:18332
|
||||
|
||||
echo -n 'f9beb4d9' | xxd -r -p
|
||||
version\00\00\00\00\00
|
||||
echo -n "711101000000000000000000c6925e5400000000000000000000000000000000000000000000ffff7f000001208d000000000000000000000000000000000000ffff7f000001208d00000000000000001b2f426974636f696e2e6f7267204578616d706c653a302e392e332f9305050000" | xxd -r -p
|
||||
"I"
|
||||
|
||||
|
||||
|
||||
/ $ bitcoin-cli echo ; echo $?
|
||||
error code: -28
|
||||
error message:
|
||||
Loading block index...
|
||||
28
|
||||
/ $ bitcoin-cli echo ; echo $?
|
||||
error code: -28
|
||||
error message:
|
||||
Rewinding blocks...
|
||||
28
|
||||
/ $ bitcoin-cli echo ; echo $?
|
||||
error code: -28
|
||||
error message:
|
||||
Loading wallet...
|
||||
28
|
||||
/ $ bitcoin-cli echo ; echo $?
|
||||
[
|
||||
]
|
||||
0
|
||||
|
||||
|
||||
/ $ a=1 ; while [ "$a" -ne "0" ]; do echo "not ready" ; sleep 2 ; bitcoin-cli echo ; a=$? ; done ; echo "ok"
|
||||
not ready
|
||||
[
|
||||
]
|
||||
ok
|
||||
|
||||
/ $ a=1 ; while [ "$a" -ne "0" ]; do echo "bitcoin not ready" ; sleep 2 ; bitcoin-cli echo ; a=$? ; done ; echo "ok"
|
||||
not ready
|
||||
error: Could not connect to the server bitcoin:18332 (error code 1 - "EOF reached")
|
||||
|
||||
Make sure the bitcoind server is running and that you are connecting to the correct RPC port.
|
||||
not ready
|
||||
error: Could not connect to the server bitcoin:18332 (error code 1 - "EOF reached")
|
||||
|
||||
Make sure the bitcoind server is running and that you are connecting to the correct RPC port.
|
||||
not ready
|
||||
error: Could not connect to the server bitcoin:18332 (error code 1 - "EOF reached")
|
||||
|
||||
Make sure the bitcoind server is running and that you are connecting to the correct RPC port.
|
||||
not ready
|
||||
error code: -28
|
||||
error message:
|
||||
Verifying wallet(s)...
|
||||
not ready
|
||||
error code: -28
|
||||
error message:
|
||||
Loading block index...
|
||||
not ready
|
||||
error code: -28
|
||||
error message:
|
||||
Loading block index...
|
||||
not ready
|
||||
error code: -28
|
||||
error message:
|
||||
Loading block index...
|
||||
not ready
|
||||
error code: -28
|
||||
error message:
|
||||
Loading block index...
|
||||
not ready
|
||||
error code: -28
|
||||
error message:
|
||||
Loading block index...
|
||||
not ready
|
||||
error code: -28
|
||||
error message:
|
||||
Loading block index...
|
||||
not ready
|
||||
error code: -28
|
||||
error message:
|
||||
Loading block index...
|
||||
not ready
|
||||
error code: -28
|
||||
error message:
|
||||
Loading block index...
|
||||
not ready
|
||||
error code: -28
|
||||
error message:
|
||||
Loading block index...
|
||||
not ready
|
||||
error code: -28
|
||||
error message:
|
||||
Loading block index...
|
||||
not ready
|
||||
error code: -28
|
||||
error message:
|
||||
Rewinding blocks...
|
||||
not ready
|
||||
error code: -28
|
||||
error message:
|
||||
Rewinding blocks...
|
||||
not ready
|
||||
error code: -28
|
||||
error message:
|
||||
Rewinding blocks...
|
||||
not ready
|
||||
error code: -28
|
||||
error message:
|
||||
Loading wallet...
|
||||
not ready
|
||||
error code: -28
|
||||
error message:
|
||||
Loading P2P addresses...
|
||||
not ready
|
||||
[
|
||||
]
|
||||
ok
|
||||
/ $
|
||||
@@ -4,7 +4,7 @@ services:
|
||||
|
||||
bitcoin_monitor:
|
||||
image: cyphernode/bitcoin:<%= bitcoin_version %>
|
||||
command: $USER sh -c 'rm -f /bitcoin_monitor/up ; while true ; do [ "$$(bitcoin-cli echo &> /dev/null ; echo $$?)" -eq "0" ] && touch /bitcoin_monitor/up || rm -f /bitcoin_monitor/up ; sleep 2 ; done'
|
||||
command: 0:0 sh -c 'rm -f /bitcoin_monitor/up ; while true ; do [ "$$(bitcoin-cli echo &> /dev/null ; echo $$?)" -eq "0" ] && touch /bitcoin_monitor/up || rm -f /bitcoin_monitor/up ; sleep 10 ; done'
|
||||
volumes:
|
||||
- bitcoin_monitor:/bitcoin_monitor
|
||||
- "<%= bitcoin_datapath %>/bitcoin-client.conf:/root/.bitcoin/bitcoin.conf"
|
||||
@@ -47,12 +47,12 @@ services:
|
||||
command: $USER ./startproxy.sh
|
||||
environment:
|
||||
- "TRACING=1"
|
||||
- "WATCHER_BTC_NODE_RPC_URL=<%= (bitcoin_mode === 'internal') ? 'bitcoin' : bitcoin_node_ip %> : <%= (net === 'regtest') ? '18443' : ((net === 'testnet') ? '18332' : '8332') %>/wallet"
|
||||
- "WATCHER_BTC_NODE_RPC_URL=<%= (bitcoin_mode === 'internal') ? 'bitcoin' : bitcoin_node_ip %>:<%= (net === 'regtest') ? '18443' : ((net === 'testnet') ? '18332' : '8332') %>/wallet"
|
||||
- "WATCHER_BTC_NODE_DEFAULT_WALLET=watching01.dat"
|
||||
- "WATCHER_BTC_NODE_XPUB_WALLET=xpubwatching01.dat"
|
||||
- "WATCHER_BTC_NODE_RPC_USER=<%= bitcoin_rpcuser %>:<%= bitcoin_rpcpassword %>"
|
||||
- "WATCHER_BTC_NODE_RPC_CFG=/tmp/watcher_btcnode_curlcfg.properties"
|
||||
- "SPENDER_BTC_NODE_RPC_URL=<%= (bitcoin_mode === 'internal') ? 'bitcoin' : bitcoin_node_ip %> : <%= (net === 'regtest') ? '18443' : ((net === 'testnet') ? '18332' : '8332') %>/wallet"
|
||||
- "SPENDER_BTC_NODE_RPC_URL=<%= (bitcoin_mode === 'internal') ? 'bitcoin' : bitcoin_node_ip %>:<%= (net === 'regtest') ? '18443' : ((net === 'testnet') ? '18332' : '8332') %>/wallet"
|
||||
- "SPENDER_BTC_NODE_DEFAULT_WALLET=spending01.dat"
|
||||
- "SPENDER_BTC_NODE_RPC_USER=<%= bitcoin_rpcuser %>:<%= bitcoin_rpcpassword %>"
|
||||
- "SPENDER_BTC_NODE_RPC_CFG=/tmp/spender_btcnode_curlcfg.properties"
|
||||
@@ -241,9 +241,7 @@ services:
|
||||
|
||||
lightning:
|
||||
image: cyphernode/clightning:<%= lightning_version %>
|
||||
# command: $USER sh -c 'a=1 ; while [ "$$a" -ne "0" ]; do echo "bitcoin not ready" ; sleep 2 ; bitcoin-cli echo ; a=$$? ; done ; echo "bitcoin ready!" ; lightningd'
|
||||
# command: $USER sh -c 'while [ "$$(bitcoin-cli echo &> /dev/null ; echo $$?)" -ne "0" ]; do echo "bitcoin not ready" ; sleep 2 ; done ; echo "bitcoin ready!" ; lightningd'
|
||||
command: $USER sh -c 'while [ ! -f "/bitcoin_monitor/up" ]; do echo "bitcoin not ready" ; sleep 2 ; done ; echo "bitcoin ready!" ; lightningd'
|
||||
command: $USER sh -c 'while [ ! -f "/bitcoin_monitor/up" ]; do echo "bitcoin not ready" ; sleep 10 ; done ; echo "bitcoin ready!" ; lightningd'
|
||||
<% if( lightning_expose ) { %>
|
||||
ports:
|
||||
- "9735:9735"
|
||||
|
||||
Reference in New Issue
Block a user