HomePhabricator

[chronik] return empty transaction history for an unknown scripthash

Description

[chronik] return empty transaction history for an unknown scripthash

Summary:
An unknown scripthash may correspond to a valid script that was never seen in the block chain or in the mempool. For consistency with scripts, make the various tx history endpoints return an empty history for unknown scripthashes.

The utxos endpoint is unchanged and keeps returning a 404 error, because if we never saw the scripthash before we cannot know what script it is related to, and we cannot construct the response.

Test Plan: ninja check-functional

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
PiRKAuthored on Thu, Jan 30, 12:56
PiRKPushed on Fri, Jan 31, 14:13
Reviewer
Restricted Project
Differential Revision
D17611: [chronik] return empty transaction history for an unknown scripthash
Parents
rABC0992b4fdbcf9: [ecash-lib] Add `HdNode` for HD wallets
Branches
Unknown
Tags
Unknown