HomePhabricator

[wallet] Get rid of CWalletTx default constructor

Authored by Russell Yanofsky <russ@yanofsky.org> on Jan 19 2017, 21:08.

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

Committed
FabienMar 11 2019, 18:16
Pushed
FabienMar 11 2019, 18:16
Reviewer
Restricted Project
Differential Revision
D2619: [wallet] Get rid of CWalletTx default constructor
Parents
rABC80cfe7eac199: [wallet] Construct CWalletTx objects in CommitTransaction
Branches
Unknown
Tags
Unknown

Event Timeline

Fabien committed rABC48adf1fb0064: [wallet] Get rid of CWalletTx default constructor (authored by Russell Yanofsky <russ@yanofsky.org>).Mar 11 2019, 18:16