Page MenuHomePhabricator

[Chronik] Index spent_by + add `spent_by` to `Tx` protobuf
ClosedPublic

Authored by tobias_ruck on Apr 23 2023, 13:18.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCe08f7ce5dd29: [Chronik] Index spent_by + add `spent_by` to `Tx` protobuf
Summary

Add which outputs have been spent by which input using SpentByWriter for the DB and MempoolSpentBy for the mempool.

Add the spent_by field to TxOutput in the protobuf; this uses the OutPoint message, note that this points to an input.

Also add a OutputsSpent helper to query us the required data to tell which outputs have been spent by which tx.

Depends on D13768.

Test Plan

ninja && ninja ./test/functional/test_runner.py chronik_spent_by

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Rebase onto chronik-refactor-query-txs

This revision is now accepted and ready to land.Apr 24 2023, 16:28