mirror of
https://github.com/aljazceru/cyphernode.git
synced 2026-01-01 03:55:29 +01:00
Multiple watching wallets, must try them all
This commit is contained in:
@@ -7,6 +7,15 @@ send_to_watcher_node() {
|
||||
send_to_bitcoin_node ${WATCHER_NODE_RPC_URL}/${WATCHER_BTC_NODE_DEFAULT_WALLET} ${WATCHER_NODE_RPC_CFG} $@
|
||||
local returncode=$?
|
||||
trace_rc ${returncode}
|
||||
|
||||
if [ "${returncode}" -ne 0 ]; then
|
||||
# Ok, since we now have multiple watching wallets, we need to try them all if it fails
|
||||
# We have 2 right now: watching and watching-for-xpubs
|
||||
send_to_watcher_node_wallet ${WATCHER_BTC_NODE_XPUB_WALLET} $@
|
||||
returncode=$?
|
||||
trace_rc ${returncode}
|
||||
}
|
||||
|
||||
return ${returncode}
|
||||
}
|
||||
|
||||
@@ -15,7 +24,7 @@ send_to_watcher_node_wallet() {
|
||||
local walletname=$1
|
||||
shift
|
||||
trace "[send_to_watcher_node_wallet] walletname=${walletname}"
|
||||
send_to_bitcoin_node ${WATCHER_NODE_RPC_URL}/$walletname ${WATCHER_NODE_RPC_CFG} $@
|
||||
send_to_bitcoin_node ${WATCHER_NODE_RPC_URL}/${walletname} ${WATCHER_NODE_RPC_CFG} $@
|
||||
local returncode=$?
|
||||
trace_rc ${returncode}
|
||||
return ${returncode}
|
||||
|
||||
Reference in New Issue
Block a user