Page MenuHomePhabricator

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

Authored by tobias_ruck on Apr 14 2023, 12:12.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
chronik-group-inputs-outputs
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 23312
Build 46243: Build Diffbuild-chronik
Build 46242: arc lint + arc unit