Blockstream / Blockstream/esplora
Calling tx/:txid and /block-height/:height "in sync" based on bitcoind zmq notifications
- Dominant language
- JavaScript
- Stars
- 1.3k
- Forks
- 514
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 16
Description
I'm running regtest scenarios where my code is calling my local esplora backend REST api based on bitcoind zmq notifications with `zmqpubhashtx` and `zmqpubhashblock`. My issue is that I call these two endpoints (`tx/:txid` and `/block-height/:height`) before esplora backend actually index them, which is causing errors:
```
INFO - handle GET /tx/8332bc9fe058113cae99b31f5472a71a757cc3cf6710ba7b2c3ca0586219333f
WARN - HttpError(404, "Transaction not found")
INFO - handle GET /block-height/106
WARN - HttpError(404, "Block not found")
```
Is there a way to call this endpoints only when these resources are available ?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.