Page MenuHomePhabricator

[wallet] Construct CWalletTx objects in CommitTransaction
ClosedPublic

Authored by Fabien on Wed, Feb 27, 11:45.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Wed, Feb 27, 11:45
Herald added a reviewer: Restricted Project. · View Herald TranscriptWed, Feb 27, 11:45
Herald added a subscriber: schancel. · View Herald Transcript
jasonbcox accepted this revision.Wed, Feb 27, 16:22
This revision is now accepted and ready to land.Wed, Feb 27, 16:22
Closed by commit rABC80cfe7eac199: [wallet] Construct CWalletTx objects in CommitTransaction (authored by Russell Yanofsky <russ@yanofsky.org>, committed by Fabien). · Explain WhyMon, Mar 11, 18:14
This revision was automatically updated to reflect the committed changes.