[chronik] fix blockchain.block.headers electrum endpoint
Summary:
We accidentaly returned an error when more than 500 headers were requested. The limit relevant to the Electrum protocol is 2016, and to match Fulcrum's behavior we don't return an error if we exceed it, we just cap the number of headers to 2016.
Depends on D18563
Test Plan:
ninja check-functional
Test it locally on mainnet:
./src/bitcoind -chronik -chronikelectrumbind="127.0.0.1:50001:t"
echo '{"jsonrpc": "2.0", "method": "blockchain.block.headers", "params": [800000, 2016], "id": "test"}' | nc 127.0.0.1 50001Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D18562