HomePhabricator

[wallet] Get rid of CWalletTx default constructor

Description

[wallet] Get rid of CWalletTx default constructor

Summary:
No change in behavior in the normal case. But buggy mapWallet lookups
with invalid txids will now throw exceptions instead of inserting dummy
entries into the map, and potentially causing segfaults and other
failures.

This also makes it a compiler error to use the mapWallet[hash] syntax
which could create dummy entries.

Partial backport of core PR9680 (commit b4bc32a)
Depends on D2618
Completes T517

Test Plan:

make check

Reviewers: #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Subscribers: jasonbcox, teamcity, schancel

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

Details

Provenance
Russell Yanofsky <russ@yanofsky.org>Authored on Jan 19 2017, 21:08
FabienCommitted on Mar 11 2019, 18:16
jasonbcoxPushed on Mar 11 2019, 21:37
Reviewer
Restricted Project
Differential Revision
D2619: [wallet] Get rid of CWalletTx default constructor
Parents
rSTAGING80cfe7eac199: [wallet] Construct CWalletTx objects in CommitTransaction
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/7768, tag: phabricator/base/7722, tag: phabricator/base/7682