Skip to content

Commit 151c1a5

Browse files
fanquakeknst
authored andcommitted
Merge bitcoin#25551: refactor: Throw exception on invalid Univalue pushes over silent ignore
fa277cd univalue: Throw exception on invalid pushes over silent ignore (MacroFake) ccccc17 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 fa277cd Tree-SHA512: ef212a5bf5ae6bbad20acc4dafa3715521e81544185988d1eab724f440e4864a27e686aff51d5bc51b3017892c2eb8e577bcb8f37e8ddbaa0d8833bb622f2f9c
1 parent 4c41f60 commit 151c1a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wallet/rpc/spend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,7 @@ RPCHelpMan walletcreatefundedpsbt()
11711171
// the user could have gotten from another RPC command prior to now
11721172
wallet.BlockUntilSyncedToCurrentChain();
11731173

1174-
UniValue options = request.params[3];
1174+
UniValue options{request.params[3].isNull() ? UniValue::VOBJ : request.params[3]};
11751175

11761176
CAmount fee;
11771177
int change_position;

0 commit comments

Comments
 (0)