HomePhabricator

[refactor multisig] make const values up front

Description

[refactor multisig] make const values up front

Summary:
Currently during the first phase of multisig, we calculate a variety
of indices and counts that then get mutated later on in
various loops, in a rather hodge-podge fashion.

This Diff changes the values calculated up front to be all const, with better
variable names, and then the mutated variables for each loop are initialized
adjacent to the loops in question. This makes it easier to logically
consider each loop in isolation.

Test Plan: make check

Reviewers: deadalnix, #bitcoin_abc, Mengerian

Reviewed By: deadalnix, #bitcoin_abc, Mengerian

Subscribers: Mengerian

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

Details

Provenance
Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com>Authored on Jul 10 2019, 01:08
markblundebergPushed on Jul 15 2019, 01:10
Reviewer
Restricted Project
Differential Revision
D3625: [refactor multisig] make const values up front
Parents
rSTAGINGbe9526156bce: remove ComparisonTestFramework dependency from segwit recovery test
Branches
Unknown
Tags
Unknown

Event Timeline

Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com> committed rSTAGING5e82569b10e0: [refactor multisig] make const values up front (authored by Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com>).Jul 15 2019, 00:47