Page MenuHomePhabricator

[backport#15638] [build] Move AnalyzePSBT from psbt.cpp to node/psbt.cpp

Authored by majcosta on May 14 2020, 21:48.



psbt.cpp definitions except for AnalyzePSBT are used by the wallet and need to
be linked into the wallet binary. AnalyzePSBT is an exception in that it is not
used by the wallet, and depends on node classes like CCoinsViewCache, and on
node global variables like nBytesPerSigOp.

So AnalyzePSBT is more at home in libbitcoin_server than libbitcoin_common, and
in any case needs to be defined in a separate object file than other PSBT
utilities, to avoid dragging link dependencies on node functions and global
variables into the wallet.

Depends on D6080

This concludes the backport of Core PR15638

Test Plan
../configure --enable-deprecated-build-system
make check

cmake .. -GNinja -DENABLE_WERROR=ON
ninja check-all

Diff Detail

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

Event Timeline

majcosta created this revision.May 14 2020, 21:48
Herald added a reviewer: Restricted Project. · View Herald TranscriptMay 14 2020, 21:48
majcosta requested review of this revision.May 14 2020, 21:48
teamcity edited the summary of this revision. (Show Details)May 14 2020, 21:48

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

nakihito requested changes to this revision.May 15 2020, 14:26
nakihito added a subscriber: nakihito.

Test plan should include autotools build.

This revision now requires changes to proceed.May 15 2020, 14:26
majcosta requested review of this revision.May 15 2020, 18:13
majcosta edited the test plan for this revision. (Show Details)

added missing autotools test plan

nakihito accepted this revision.May 15 2020, 18:33
This revision is now accepted and ready to land.May 15 2020, 18:33