Page MenuHomePhabricator

Switch away from exceptions in refactored tx code
ClosedPublic

Authored by Fabien on Apr 15 2020, 12:42.

Details

Summary
After refactoring general-purpose PSBT and transaction code out of RPC
code, for use in the GUI, it's no longer appropriate to throw
exceptions. Instead we now return bools for success, and take an output
parameter for an error object.
We still use JSONRPCError() for the error objects, since only RPC
callers actually care about the error codes.

Partial backport of core PR14978:
https://github.com/bitcoin/bitcoin/pull/14978/commits/bd0dbe8763fc3029cf96531c9ccaba280b939445

Test Plan
ninja all check check-functional

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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

This revision is now accepted and ready to land.Apr 15 2020, 15:45