File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -1521,7 +1521,6 @@ RPCHelpMan sendall()
15211521 CoinFilterParams coins_params;
15221522 coins_params.min_amount = 0 ;
15231523 for (const COutput& output : AvailableCoins (*pwallet, &coin_control, fee_rate, coins_params).All ()) {
1524- CHECK_NONFATAL (output.input_bytes > 0 );
15251524 if (send_max && fee_rate.GetFee (output.input_bytes ) > output.txout .nValue ) {
15261525 continue ;
15271526 }
@@ -1544,6 +1543,9 @@ RPCHelpMan sendall()
15441543
15451544 // estimate final size of tx
15461545 const TxSize tx_size{CalculateMaximumSignedTxSize (CTransaction (rawTx), pwallet.get ())};
1546+ if (tx_size.vsize == -1 ) {
1547+ throw JSONRPCError (RPC_WALLET_ERROR, " Unable to determine the size of the transaction, the wallet contains unsolvable descriptors" );
1548+ }
15471549 const CAmount fee_from_size{fee_rate.GetFee (tx_size.vsize )};
15481550 const std::optional<CAmount> total_bump_fees{pwallet->chain ().calculateCombinedBumpFee (outpoints_spent, fee_rate)};
15491551 CAmount effective_value = total_input_value - fee_from_size - total_bump_fees.value_or (0 );
You can’t perform that action at this time.
0 commit comments