HomePhabricator

Rewrite OutputGroups to be clearer and to use scriptPubKeys

Description

Rewrite OutputGroups to be clearer and to use scriptPubKeys

Summary:

Rewrite OutputGroups so that the logic is easier to follow and understand.

There is a slight behavior change as OutputGroups will be grouped by scriptPubKey rather than CTxDestination as before. This should have no effect on users as all addresses are a CTxDestination. However by using
scriptPubKeys, we can correctly group outputs which fall into the NoDestination case. But we also shouldn't have any NoDestination outputs.

Completes backport of core#20040:
https://github.com/bitcoin/bitcoin/pull/20040/commits/5d4597666d589e39354e0d8dd5b2afbe1a5d7d8e

Depends on D14022.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

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

Details

Provenance
Andrew Chow <achow101-github@achow101.com>Authored on Dec 9 2020, 00:19
FabienCommitted on Jun 9 2023, 13:24
FabienPushed on Jun 9 2023, 13:24
Reviewer
Restricted Project
Differential Revision
D14023: Rewrite OutputGroups to be clearer and to use scriptPubKeys
Parents
rABC8c9a764afae1: Explicitly filter out partial groups when we don't want them
Branches
Unknown
Tags
Unknown