Should herald support --chain argument, or should the chain (aka env.coin) be inferred from DBState? #90

Open
opened 2022-08-31 21:50:42 +02:00 by moodyjon · 1 comment
moodyjon commented 2022-08-31 21:50:42 +02:00 (Migrated from github.com)

In most cases the DB (--db_dir=X) will have been populated by scribe, and so it's the scribe --chain=Y argument that's determinative.

(venv) swdev1@Jonathans-Mac-mini hub % herald --help
usage: herald [-h] --db_dir DB_DIR [--reorg_limit REORG_LIMIT] [--chain {mainnet,regtest,testnet}] [--max_query_workers MAX_QUERY_WORKERS] [--cache_all_tx_hashes] [--cache_all_claim_txos]
..snip...
optional arguments:
  -h, --help            show this help message and exit
  --db_dir DB_DIR       Path of the directory containing lbry-rocksdb.
  --reorg_limit REORG_LIMIT
                        Max reorg depth
  --chain {mainnet,regtest,testnet}
                        Which chain to use, default is mainnet, others are used for testing
...snip...
In most cases the DB (--db_dir=X) will have been populated by scribe, and so it's the *scribe* --chain=Y argument that's determinative. ``` (venv) swdev1@Jonathans-Mac-mini hub % herald --help usage: herald [-h] --db_dir DB_DIR [--reorg_limit REORG_LIMIT] [--chain {mainnet,regtest,testnet}] [--max_query_workers MAX_QUERY_WORKERS] [--cache_all_tx_hashes] [--cache_all_claim_txos] ..snip... optional arguments: -h, --help show this help message and exit --db_dir DB_DIR Path of the directory containing lbry-rocksdb. --reorg_limit REORG_LIMIT Max reorg depth --chain {mainnet,regtest,testnet} Which chain to use, default is mainnet, others are used for testing ...snip... ```
moodyjon commented 2023-01-03 20:30:21 +01:00 (Migrated from github.com)

Herald.go implemented an optional --chain argument this way:
e070e8a51e/server/server.go (L275)

Herald.go implemented an optional `--chain` argument this way: https://github.com/moodyjon/herald.go/blob/e070e8a51ead553f31680e99d6cacd56bfcf3a2c/server/server.go#L275
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/hub#90
No description provided.