HomePhabricator

[wallet] Construct CWalletTx objects in CommitTransaction

Description

[wallet] Construct CWalletTx objects in CommitTransaction

Summary:
Construct CWalletTx objects in CWallet::CommitTransaction, instead of
having callers do it. This ensures CWalletTx objects are constructed in
a uniform way and all fields are set.

This also makes it possible to avoid confusing and wasteful CWalletTx
copies in https://github.com/bitcoin/bitcoin/pull/9381

There is no change in behavior.

Partial backport of core PR9680 (commit a128bdc)
Depends on D2611

Test Plan:

make check

Reviewers: #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Subscribers: teamcity, schancel

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

Details

Provenance
Russell Yanofsky <russ@yanofsky.org>Authored on Feb 2 2017, 20:30
FabienCommitted on Mar 11 2019, 18:14
FabienPushed on Mar 11 2019, 18:14
Reviewer
Restricted Project
Differential Revision
D2618: [wallet] Construct CWalletTx objects in CommitTransaction
Parents
rABCfa270cac02ed: Merge #10706: Improve wallet fee logic and fix GUI bugs
Branches
Unknown
Tags
Unknown