HomePhabricator

[Chronik] Refactor `Group`, add `input_members` and `output_members`

Description

[Chronik] Refactor Group, add input_members and output_members

Summary:
While for the group history, it's fine to have all members be in one iterator with both inputs and outputs, for the UTXOs, we have to know which input/output a member belongs to.

For this, we add input_members and output_members, which return iterators of MemberItem, which add an idx to members so we know which input/output it's associated with.

We add tx_members_for_group so we retain the convenience of having one function returning all the members for group history.

We also change the Iter type of the existing groups to Vec, which also implements IntoIterator. This makes the code more simple and has been an oversight before.

Depends on D13704.

Test Plan: ninja check-crates && ninja check-functional

Reviewers: Fabien, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

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

Details

Provenance
tobias_ruckAuthored on Apr 14 2023, 12:07
tobias_ruckPushed on Apr 14 2023, 14:14
Reviewer
Restricted Project
Differential Revision
D13717: [Chronik] Refactor `Group`, add `input_members` and `output_members`
Parents
rABCaf54168d27d7: Bump version to 0.27.3
Branches
Unknown
Tags
Unknown