HomePhabricator

Merge #10368: [wallet] Remove helper conversion operator from wallet

Description

Merge #10368: [wallet] Remove helper conversion operator from wallet

Summary:
5a5e4e9 [wallet] Remove CTransaction&() helper conversion operator from wallet implementation. (Karl-Johan Alm)

Pull request description:

The `CTransaction&()` operator in `CMerkleTx` makes conversion into `CTransaction`s transparent, but was marked as to-be-removed in favor of explicitly getting the `tx` ivar, presumably as the operator can lead to ambiguous behavior and makes the code harder to follow.

This PR removes the operator and adapts callers. This includes some cases of `static_cast<CTransaction>(wtx)` → `*wtx.tx`, which is definitely an improvement.

Tree-SHA512: 95856fec7194d6a79615ea1c322abfcd6bcedf6ffd0cfa89bbdd332ce13035fa52dd4b828d20df673072dde1be64b79c513529a6f422dd5f0961ce722a32d56a

Backport of Core PR 10368
https://github.com/bitcoin/bitcoin/pull/10368/files
Completes T588

Note: The change in walletmodeltransaction.cpp is missing due to this out-of-order backport: D2618

Test Plan:

make check
test_runner.py

Reviewers: deadalnix, Fabien, #bitcoin_abc

Reviewed By: deadalnix, #bitcoin_abc

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

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Nov 9 2017, 13:22
jasonbcoxCommitted on Apr 10 2019, 22:47
jasonbcoxPushed on Apr 10 2019, 22:47
Reviewer
Restricted Project
Differential Revision
D2794: Merge #10368: [wallet] Remove helper conversion operator from wallet
Parents
rABC36fb94ee0821: Remove much of the remaining BIP9 code
Branches
Unknown
Tags
Unknown