Expose ZMQ block notifications toggle in config

New 'zmq-enabled' boolean (default true) makes the entrypoint
export BITCOIN_ZMQ_BLOCK=tcp://<bitcoind-host>:28332, which
kamado-api's zmqmon subscribes to for sub-second chain refresh
on the dashboard. Disable it if your bitcoind doesn't have
zmqpubhashblock exposed.
This commit is contained in:
satoshi
2026-04-14 11:16:04 +03:00
parent 31abbbd4a1
commit 74387b8c45
2 changed files with 15 additions and 0 deletions
+8
View File
@@ -42,10 +42,13 @@ export MINDIFF=$(q '.mindiff // 1000')
export MAXDIFF=$(q '.maxdiff // 0')
export DROPIDLE=$(q '.dropidle // 0')
LOG_LEVEL=$(q '.log-level // "info"')
ZMQ_ENABLED=$(q '.zmq-enabled // true')
export LOGDIR=/var/log/ckpool
export SOCKET_DIR=/run/ckpool
export BITCOIN_NOTIFY=true
# ckpool itself doesn't use ZMQ in this build — zmqblock is stripped
# from the rendered conf below. kamado-api subscribes separately.
export ZMQ_BLOCK=""
export BLOCKPOLL_MS=100
export UPDATE_INTERVAL_S=30
@@ -86,6 +89,11 @@ export CKPOOL_LOGFILE="${LOGDIR}/ckpool.log"
export BITCOIN_RPC_URL="http://${BITCOIN_RPC_HOST}:${BITCOIN_RPC_PORT}"
export POLL_INTERVAL=5s
export KAMADO_LOG_LEVEL="${LOG_LEVEL}"
if [[ "${ZMQ_ENABLED}" == "true" ]]; then
export BITCOIN_ZMQ_BLOCK="tcp://${BITCOIN_RPC_HOST}:28332"
else
export BITCOIN_ZMQ_BLOCK=""
fi
echo "kamado-entrypoint: starting kamado-api"
/usr/local/bin/kamado-api &