Page MenuHomePhabricator

[chronik] return empty transaction history for an unknown scripthash
AcceptedPublic

Authored by PiRK on Thu, Jan 30, 13:02.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
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

Event Timeline

PiRK requested review of this revision.Thu, Jan 30, 13:02
Fabien retitled this revision from [chronik] return empty transcation history for an unknown scripthash to [chronik] return empty transaction history for an unknown scripthash.Thu, Jan 30, 20:37
Fabien added a subscriber: Fabien.
Fabien added inline comments.
test/functional/chronik_scripthash.py
274

Maybe change the name if you find a better one

This revision is now accepted and ready to land.Thu, Jan 30, 20:50