diff options
author | fanquake <fanquake@gmail.com> | 2022-07-15 16:31:08 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2022-07-15 16:33:55 +0100 |
commit | a969b2fcd389363fb8add03b063f31357f0f79e1 (patch) | |
tree | e3467d14243adb801b9bdd280d72d0c6f92f0b70 /src/wallet | |
parent | 85b601e04363664eae1b4b802cd8dde942761939 (diff) | |
parent | fa277cd55dd105018e7d1220b4c3d96779e6b0f4 (diff) | |
download | bitcoin-a969b2fcd389363fb8add03b063f31357f0f79e1.tar.xz |
Merge bitcoin/bitcoin#25551: refactor: Throw exception on invalid Univalue pushes over silent ignore
fa277cd55dd105018e7d1220b4c3d96779e6b0f4 univalue: Throw exception on invalid pushes over silent ignore (MacroFake)
ccccc17b91698aa09ac85f7efea298f3938594ad refactor: Default options in walletcreatefundedpsbt to VOBJ instead of VNULL (MacroFake)
Pull request description:
The return value of the `push*` helpers is never used, but important to determine if the operation was successful. One way to fix this would be to add the "nodiscard" attribute. However, this would make the code (and this diff) overly verbose for no reason.
So fix it by removing the never used return value. Also, fail verbosely in case of a programming mistake.
ACKs for top commit:
furszy:
code ACK fa277cd5
Tree-SHA512: ef212a5bf5ae6bbad20acc4dafa3715521e81544185988d1eab724f440e4864a27e686aff51d5bc51b3017892c2eb8e577bcb8f37e8ddbaa0d8833bb622f2f9c
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/rpc/spend.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/rpc/spend.cpp b/src/wallet/rpc/spend.cpp index 22c1f2bdc2..83e23497cb 100644 --- a/src/wallet/rpc/spend.cpp +++ b/src/wallet/rpc/spend.cpp @@ -1633,7 +1633,7 @@ RPCHelpMan walletcreatefundedpsbt() }, true ); - UniValue options = request.params[3]; + UniValue options{request.params[3].isNull() ? UniValue::VOBJ : request.params[3]}; CAmount fee; int change_position; |