Page MenuHomePhabricator

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

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

Details

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.Jan 30 2025, 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.Jan 30 2025, 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.Jan 30 2025, 20:50