-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Factor out PSBT utilities from RPCs for use in GUI code; related refactoring. #14978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Factor out PSBT utilities from RPCs for use in GUI code; related refactoring. #14978
Conversation
src/core_read.cpp
Outdated
|
||
bool DecodeRawPSBT(PartiallySignedTransaction& psbt, const std::string& tx_data, std::string& error) | ||
{ | ||
CDataStream ss_data(tx_data.begin(), tx_data.end(), SER_NETWORK, PROTOCOL_VERSION); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I thought I was very clever converting this from a std::vector<unsigned char> to a std::string, but the reality appears to be that Clang is happy with this line and g++ hates it, so I'm going to have to massage this back towards the original version a bit, in order to get it to build anywhere but macOS.
I cleverly made a small change that apparently g++ does not accept but Clang does, so I will have to fix that before it will build on Linux, oops. (I commented on the offending line in the diff.) |
3c91a3d
to
2fe27d6
Compare
Hmm, something is also legitimately broken in the tests, will investigate tomorrow. :-\ |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
Concept ACK.
Can you detail the GUI part?
Is it available? |
2fe27d6
to
909bda5
Compare
I'm adding an interface for offline and multisig signing in the GUI, using PSBT as the on-disk format for the intermediate files. See e.g. how Bitcoin Armory handles offline transactions, which I'm basically copying.
I pasted it into #bitcoin-core-dev awhile ago -- I will link it here in the comment thread once I'm sure the tip of my branch is still actually building. |
@gwillen writes:
* Move most PSBT definitions into psbt.h.
* Move most PSBT RPC utilities into psbt.{h,cpp}.
* Move wallet-touching PSBT RPC utilities (FillPSBT) into
wallet/psbtwallet.{h,cpp}.
* Switch exceptions from JSONRPCError() to new PSBTException class.
* Split DecodePSBT into DecodeBase64PSBT (old behavior) and DecodeRawPSBT.
* Add one new version of DecodeBase64 utility in strencodings.h (and
corresponding DecodeBase32 for completeness).
* Factor BroadcastTransaction utility function out of sendrawtransaction RPC
handler in rpc/rawtransaction.cpp
Is it possible to split this commit into one for each of the points
here? It makes review harder when everything is squashed into a single commit.
|
The GUI work is WIP here: https://github.com/gwillen/bitcoin/tree/feature-offline-v1 . I made that branch at a known-working version, since I'm making significant changes to it right now. It's not currently based on this PR, which I will have to rebase it onto later; this PR is an extraction of some refactoring that also appears in that PR, plus some other stuff that doesn't yet. |
@jb55 Yeah, I can definitely split it out if people prefer. Will take a day or two to get to. I might ask slight forgiveness in some cases where a reasonable intermediate state between two combined changes never existed, and would be hard to recreate. |
Would be helpful to split the commit up, for review now and for intelligibility when looking back in the future. |
Concept ACK. Agree with above, split this into multiple commits. |
I definitely agree in splitting it. @gwillen checked out the branch and looks promising. |
71290c3
to
e155e95
Compare
Sorry for the delay. I have split the PR into more reasonable commits. The one that does the bulk of the code movement between files ("Move PSBT definitions and code to separate files") is now only movement (and adjusting headers / Makefile), and no other substantive changes. The final result is exactly the same as before, except for a single stray blank line I had accidentally introduced in the previous version, which is removed. Every intermediate step is intended to be sane and self-contained (and buildable), but I haven't actually verified (by compiler rather than by eye) that every intermediate step cleanly builds yet. (EDIT: Wellll, I was pretty close. All intermediate states now build and pass tests.) |
e155e95
to
dd45d3f
Compare
This looks much better now! Thanks! utACK dd45d3f The refactorings look pretty good in general. I did a quick skim of the code, I didn't see anything obviously wrong but I'm no expert on this part of the codebase. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK dd45d3f
Some comments, nothing that block this IMO
src/util/strencodings.cpp
Outdated
@@ -188,9 +188,9 @@ std::vector<unsigned char> DecodeBase64(const char* p, bool* pfInvalid) | |||
return ret; | |||
} | |||
|
|||
std::string DecodeBase64(const std::string& str) | |||
std::string DecodeBase64(const std::string& str, bool* pfInvalid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: variable name should be snake_case. See doc/developer-notes.md for naming convention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was copied from surrounding context (it just wraps the c_str version of the same function, which has the same parameter named the same thing, and I'm propagating it outwards to the wrapper.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md:
When writing patches, favor the new style over attempting to mimic the surrounding style, except for move-only commits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: we're only calling DecodeBase64
in a handful of places, so you could also change the return type to bool
and pass the output string as a reference param. Though it also makes sense to remain consistent with the existing (char*) methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will fix the argument name, but otherwise leave things alone unless you would strongly prefer the more invasive changes. (I am changing pfInvalid to pf_invalid everywhere in the surrounding context, because it will drive me completely nuts to make it inconsistent. Please don't make me do that.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, let's not do too much in this PR.
src/psbt.h
Outdated
/** An exception in PSBT processing that represents a problem with the input data -- | ||
when the input data is user-supplied, it is appropriate to catch() this and use | ||
e.what() to retrieve a human-readable error message. */ | ||
class PSBTException: public std::runtime_error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This results in RPC errors with a code RPC_MISC_ERROR
. I think it would be better if you could somehow make the error code more specific (the message still comes through).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'd love any thoughts on how to accomplish this without gunking up non-RPC code too much when it calls this codepath. I don't really want this to depend on the RPC stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thread 617247c#r246575002
One simple way this could be achieved is to add custom error handler to CRPCCommand
which would translate this exception to the desired output.
One non intrusive way to add the error handler is to set it in
bitcoin/src/wallet/rpcwallet.cpp
Lines 4194 to 4197 in 391a273
void RegisterWalletRPCCommands(CRPCTable &t) | |
{ | |
for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++) | |
t.appendCommand(commands[vcidx].name, &commands[vcidx]); |
This way all desired commands would share the same error handling and then we can start removing duplicate error messages in the code by introducing more specific exceptions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm slightly worried about the use of exceptions in code that use usable in more places than just RPC, as C++ can't guarantee that all possible exceptions are being dealt with at the right layer.
Would an enum with PSBT-related error codes, plus a enum to string conversion function (like in script/script_error) make sense?
FWIW I believe the travis failure is spurious -- it failed a single unrelated test, on a single platform, and the code hasn't changed since the last time it succeeded. |
dd45d3f
to
c062d74
Compare
(Minor edit to remove a single unnecessary #include line that was bugging me, no significant change.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK c062d74 .Verified the move only commit, just adds necessary includes and updates the makefile with the new file. Some nits and other comments for your consideration.
bool invalid; | ||
std::string tx_data = DecodeBase64(base64_tx, &invalid); | ||
if (invalid) { | ||
error = "invalid base64"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit 801333b
Could add test for this new error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|
||
bool DecodeRawPSBT(PartiallySignedTransaction& psbt, const std::string& tx_data, std::string& error) | ||
{ | ||
CDataStream ss_data(tx_data.data(), tx_data.data() + tx_data.size(), SER_NETWORK, PROTOCOL_VERSION); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit 801333b
To avoid changing this line you could add a commit before with something along:
--- a/src/streams.h
+++ b/src/streams.h
@@ -236,17 +236,8 @@ public:
Init(nTypeIn, nVersionIn);
}
- CDataStream(const vector_type& vchIn, int nTypeIn, int nVersionIn) : vch(vchIn.begin(), vchIn.end())
- {
- Init(nTypeIn, nVersionIn);
- }
-
- CDataStream(const std::vector<char>& vchIn, int nTypeIn, int nVersionIn) : vch(vchIn.begin(), vchIn.end())
- {
- Init(nTypeIn, nVersionIn);
- }
-
- CDataStream(const std::vector<unsigned char>& vchIn, int nTypeIn, int nVersionIn) : vch(vchIn.begin(), vchIn.end())
+ template <typename T>
+ CDataStream(const T& vchIn, int nTypeIn, int nVersionIn) : vch(vchIn.begin(), vchIn.end())
{
Init(nTypeIn, nVersionIn);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this safe (does it not "prove too much")? Certainly I can imagine it might cause worse error messages in some cases. I assume it wasn't done that way for some reason originally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@achow101 thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for fun, I went and checked -- this code is essentially unchanged since the repo was first imported to github in 2009. So the rationale is probably lost to history...
src/core_io.h
Outdated
@@ -37,7 +37,8 @@ bool DecodeHexBlockHeader(CBlockHeader&, const std::string& hex_header); | |||
*/ | |||
bool ParseHashStr(const std::string& strHex, uint256& result); | |||
std::vector<unsigned char> ParseHexUV(const UniValue& v, const std::string& strName); | |||
NODISCARD bool DecodePSBT(PartiallySignedTransaction& psbt, const std::string& base64_tx, std::string& error); | |||
NODISCARD bool DecodeBase64PSBT(PartiallySignedTransaction& psbt, const std::string& base64_tx, std::string& error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit 801333b
nit, would be nice see brief comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: base64_psbt
(see next comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
src/core_io.h
Outdated
@@ -37,7 +37,8 @@ bool DecodeHexBlockHeader(CBlockHeader&, const std::string& hex_header); | |||
*/ | |||
bool ParseHashStr(const std::string& strHex, uint256& result); | |||
std::vector<unsigned char> ParseHexUV(const UniValue& v, const std::string& strName); | |||
NODISCARD bool DecodePSBT(PartiallySignedTransaction& psbt, const std::string& base64_tx, std::string& error); | |||
NODISCARD bool DecodeBase64PSBT(PartiallySignedTransaction& psbt, const std::string& base64_tx, std::string& error); | |||
NODISCARD bool DecodeRawPSBT(PartiallySignedTransaction& psbt, const std::string& tx_data, std::string& error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit 801333b
nit, s/tx_data/raw_tx?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both tx_data
and raw_tx
suggest a transaction hex. Something like raw_psbt
is probably more clear, and consistent with the function name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
src/rpc/rawtransaction.h
Outdated
@@ -13,6 +13,9 @@ namespace interfaces { | |||
class Chain; | |||
} // namespace interfaces | |||
|
|||
/** Broadcast a transaction */ | |||
std::string BroadcastTransaction(CTransactionRef tx, bool allowhighfees = false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit 745c540
Shouldn't this be elsewhere if the goal is to use in the GUI?
I think this should return uint256
.
nit, could document that the transaction id is returned.
nit, s/allowhighfees/allow_high_fees.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returning uint256 seems more natural indeed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also need access to this function in #14912 from other wallet RPC methods. Not really an issue, because I can always include src/rpc/rawtransaction.h
. But perhaps create a new src/wallet/transaction.cpp
?
I might add BroadcastTransaction(PartiallySignedTransaction psbt, bool allowhighfees = false)
in my own PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed that this should be elsewhere, I will create src/wallet/transaction.cpp for it. (I was reluctant to be too original just to move a single function, but I prefer it that way also.) And agree regarding the return value, will change it.
I don't think there's too much additional value in taking a PartiallySignedTransaction, since finalization always results in a CTransaction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(agree with the latter, I ended up with a different approach too, the seperate file is useful enough)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, but this now makes it more obvious that BroadcastTransaction has the same question as the PSBT functions as to how it shall signal an error, since right now it throws UniValues like the other RPC stuff.
src/rpc/rawtransaction.cpp
Outdated
RPCTypeCheck(request.params, {UniValue::VSTR, UniValue::VBOOL}); | ||
|
||
// parse hex string from parameter | ||
CMutableTransaction mtx; | ||
if (!DecodeHexTx(mtx, request.params[0].get_str())) | ||
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed"); | ||
CTransactionRef tx(MakeTransactionRef(std::move(mtx))); | ||
|
||
bool allowhighfees = !request.params[1].isNull() && request.params[1].get_bool(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit 745c540
nit, despite being valid I think it's more readable in the form:
bool allowhighfees = false;
if (!request.params[1].isNull()) allowhighfees = request.params[1].get_bool();
Because it is more clear the default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, done.
src/psbt.h
Outdated
/** An exception in PSBT processing that represents a problem with the input data -- | ||
when the input data is user-supplied, it is appropriate to catch() this and use | ||
e.what() to retrieve a human-readable error message. */ | ||
class PSBTException: public std::runtime_error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thread 617247c#r246575002
One simple way this could be achieved is to add custom error handler to CRPCCommand
which would translate this exception to the desired output.
One non intrusive way to add the error handler is to set it in
bitcoin/src/wallet/rpcwallet.cpp
Lines 4194 to 4197 in 391a273
void RegisterWalletRPCCommands(CRPCTable &t) | |
{ | |
for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++) | |
t.appendCommand(commands[vcidx].name, &commands[vcidx]); |
This way all desired commands would share the same error handling and then we can start removing duplicate error messages in the code by introducing more specific exceptions.
src/psbt.h
Outdated
{ | ||
return !(a == b); | ||
// Checks if they refer to the same underlying CTransaction | ||
bool SameTx(const PartiallySignedTransaction& psbt) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit 08ef528
If this is only used once and you now it's called from Merge
then I suggest to inline it there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, done.
@@ -391,20 +391,15 @@ struct PartiallySignedTransaction | |||
std::map<std::vector<unsigned char>, std::vector<unsigned char>> unknown; | |||
|
|||
bool IsNull() const; | |||
void Merge(const PartiallySignedTransaction& psbt); | |||
NODISCARD bool Merge(const PartiallySignedTransaction& psbt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit 08ef528
Add comment explaining the return value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
src/psbt.cpp
Outdated
} | ||
} | ||
|
||
PartiallySignedTransaction CombinePSBTs(std::vector<PartiallySignedTransaction> psbtxs) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Big concept ACK
src/util/strencodings.cpp
Outdated
@@ -188,9 +188,9 @@ std::vector<unsigned char> DecodeBase64(const char* p, bool* pfInvalid) | |||
return ret; | |||
} | |||
|
|||
std::string DecodeBase64(const std::string& str) | |||
std::string DecodeBase64(const std::string& str, bool* pfInvalid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md:
When writing patches, favor the new style over attempting to mimic the surrounding style, except for move-only commits.
src/rpc/rawtransaction.h
Outdated
@@ -13,6 +13,9 @@ namespace interfaces { | |||
class Chain; | |||
} // namespace interfaces | |||
|
|||
/** Broadcast a transaction */ | |||
std::string BroadcastTransaction(CTransactionRef tx, bool allowhighfees = false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returning uint256 seems more natural indeed.
src/psbt.h
Outdated
/** An exception in PSBT processing that represents a problem with the input data -- | ||
when the input data is user-supplied, it is appropriate to catch() this and use | ||
e.what() to retrieve a human-readable error message. */ | ||
class PSBTException: public std::runtime_error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm slightly worried about the use of exceptions in code that use usable in more places than just RPC, as C++ can't guarantee that all possible exceptions are being dealt with at the right layer.
Would an enum with PSBT-related error codes, plus a enum to string conversion function (like in script/script_error) make sense?
… GUI code; related refactoring Only contains 162ffef
Merge bitcoin#19660, bitcoin#19373, bitcoin#19841, bitcoin#13862, bitcoin#13866, bitcoin#17280, bitcoin#17682 and partial bitcoin#19326, bitcoin#14978: Auxiliary Backports
…UI code; related refactoring
…UI code; related refactoring
…UI code; related refactoring
…UI code; related refactoring
…UI code; related refactoring
…UI code; related refactoring
merge bitcoin#16117, bitcoin#18358, bitcoin#17383, bitcoin#21052, bitcoin#14424, bitcoin#15159, bitcoin#14689, bitcoin#14978, partial bitcoin#16908, bitcoin#14978, bitcoin#13932: Auxillary Backports
…UI code; related refactoring
fa9b60c Remove unused TransactionError constants (MarcoFalke) Pull request description: Fixup to bitcoin#14978, which introduced a bunch of unused enum values, such as `UNKNOWN_ERROR`, `ERROR_COUNT` and `TRANSACTION_ERR_LAST`. None of those have a meaning in the context of an `enum class`, where the compiler can infer if all cases have been covered in a switch-case. Also, move the global `::maxTxFee` back to the rpc caller, so it can be set on a per call basis (in the future). Tree-SHA512: 7f1e2d795f1c1278ecd54ddab2b92c2a862f3c637b482d1d008208925befa1c9dd4b3c4bb1bfcbc5ca4b66a41004aaf01ea96ea95236f944250b8a6cf99ff173
fa9b60c Remove unused TransactionError constants (MarcoFalke) Pull request description: Fixup to bitcoin#14978, which introduced a bunch of unused enum values, such as `UNKNOWN_ERROR`, `ERROR_COUNT` and `TRANSACTION_ERR_LAST`. None of those have a meaning in the context of an `enum class`, where the compiler can infer if all cases have been covered in a switch-case. Also, move the global `::maxTxFee` back to the rpc caller, so it can be set on a per call basis (in the future). Tree-SHA512: 7f1e2d795f1c1278ecd54ddab2b92c2a862f3c637b482d1d008208925befa1c9dd4b3c4bb1bfcbc5ca4b66a41004aaf01ea96ea95236f944250b8a6cf99ff173
fa9b60c Remove unused TransactionError constants (MarcoFalke) Pull request description: Fixup to bitcoin#14978, which introduced a bunch of unused enum values, such as `UNKNOWN_ERROR`, `ERROR_COUNT` and `TRANSACTION_ERR_LAST`. None of those have a meaning in the context of an `enum class`, where the compiler can infer if all cases have been covered in a switch-case. Also, move the global `::maxTxFee` back to the rpc caller, so it can be set on a per call basis (in the future). Tree-SHA512: 7f1e2d795f1c1278ecd54ddab2b92c2a862f3c637b482d1d008208925befa1c9dd4b3c4bb1bfcbc5ca4b66a41004aaf01ea96ea95236f944250b8a6cf99ff173
fa9b60c Remove unused TransactionError constants (MarcoFalke) Pull request description: Fixup to bitcoin#14978, which introduced a bunch of unused enum values, such as `UNKNOWN_ERROR`, `ERROR_COUNT` and `TRANSACTION_ERR_LAST`. None of those have a meaning in the context of an `enum class`, where the compiler can infer if all cases have been covered in a switch-case. Also, move the global `::maxTxFee` back to the rpc caller, so it can be set on a per call basis (in the future). Tree-SHA512: 7f1e2d795f1c1278ecd54ddab2b92c2a862f3c637b482d1d008208925befa1c9dd4b3c4bb1bfcbc5ca4b66a41004aaf01ea96ea95236f944250b8a6cf99ff173
fa9b60c Remove unused TransactionError constants (MarcoFalke) Pull request description: Fixup to bitcoin#14978, which introduced a bunch of unused enum values, such as `UNKNOWN_ERROR`, `ERROR_COUNT` and `TRANSACTION_ERR_LAST`. None of those have a meaning in the context of an `enum class`, where the compiler can infer if all cases have been covered in a switch-case. Also, move the global `::maxTxFee` back to the rpc caller, so it can be set on a per call basis (in the future). Tree-SHA512: 7f1e2d795f1c1278ecd54ddab2b92c2a862f3c637b482d1d008208925befa1c9dd4b3c4bb1bfcbc5ca4b66a41004aaf01ea96ea95236f944250b8a6cf99ff173
fa9b60c Remove unused TransactionError constants (MarcoFalke) Pull request description: Fixup to bitcoin#14978, which introduced a bunch of unused enum values, such as `UNKNOWN_ERROR`, `ERROR_COUNT` and `TRANSACTION_ERR_LAST`. None of those have a meaning in the context of an `enum class`, where the compiler can infer if all cases have been covered in a switch-case. Also, move the global `::maxTxFee` back to the rpc caller, so it can be set on a per call basis (in the future). Tree-SHA512: 7f1e2d795f1c1278ecd54ddab2b92c2a862f3c637b482d1d008208925befa1c9dd4b3c4bb1bfcbc5ca4b66a41004aaf01ea96ea95236f944250b8a6cf99ff173
fa9b60c Remove unused TransactionError constants (MarcoFalke) Pull request description: Fixup to bitcoin#14978, which introduced a bunch of unused enum values, such as `UNKNOWN_ERROR`, `ERROR_COUNT` and `TRANSACTION_ERR_LAST`. None of those have a meaning in the context of an `enum class`, where the compiler can infer if all cases have been covered in a switch-case. Also, move the global `::maxTxFee` back to the rpc caller, so it can be set on a per call basis (in the future). Tree-SHA512: 7f1e2d795f1c1278ecd54ddab2b92c2a862f3c637b482d1d008208925befa1c9dd4b3c4bb1bfcbc5ca4b66a41004aaf01ea96ea95236f944250b8a6cf99ff173
wallet/psbtwallet.{h,cpp}.
corresponding DecodeBase32 for completeness).
handler in rpc/rawtransaction.cpp
Note: For those keeping score at home wondering why refactor, this is in anticipation of (and developed in parallel with) a change to actually introduce GUI use of all this stuff, which is already under development and working-ish.