HomePhabricator

[Chronik] Add `-chronik` and `-chronikbind` command line options

Description

[Chronik] Add -chronik and -chronikbind command line options

Summary:
Unless -chronik is specified, Chronik now will not be started.
-chronikbind tells Chronik to bind its HTTP server to the given addresses. Currently, this only logs, in a future diff this will be parsed and listened to.

Test Plan:

  1. ninja
  2. ./src/bitcoind -regtest -> No Chronik log
  3. ./src/bitcoind -regtest -chronik -> Starting Chronik bound to [127.0.0.1:18442, [::1]:18442]
  4. ./src/bitcoind -regtest -chronik -chronikbind=0.0.0.0:1234 -> Starting Chronik bound to [0.0.0.0:1234]
  5. ./src/bitcoind -regtest -chronik -chronikbind=1.2.3.4 -chronikbind=\[::5\]:6789 -> Starting Chronik bound to [1.2.3.4:18442, [::0.0.0.5]:6789]
  6. ./src/bitcoind -regtest -chronik -chronikbind=invalid -> Error: Invalid Chronik host address "invalid": invalid IP address syntax

Reviewers: Fabien, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D12676

Details

Provenance
tobias_ruckAuthored on Dec 4 2022, 17:07
tobias_ruckPushed on Dec 5 2022, 11:59
Reviewer
Restricted Project
Differential Revision
D12676: [Chronik] Add `-chronik` and `-chronikbind` command line options
Parents
rABC63ec2509b601: [doc] Fix the coin amount type in tracing.md
Branches
Unknown
Tags
Unknown