2776 | @@ -2777,7 +2777,7 @@ bool CWallet::CreateTransaction(interfaces::Chain::Lock& locked_chain, const std
2777 | strFailReason = _("Transaction needs a change address, but we can't generate it. Please call keypoolrefill first.").translated;
2778 | }
2779 | scriptChange = GetScriptForDestination(dest);
2780 | - assert(!dest.empty() || scriptChange.empty());
2781 | + CHECK_NONFATAL(!boost::get<CNoDestination>(&dest) == !scriptChange.empty());
Could the boost::get() return value be converted to bool explicitly?
Could the boost::get() return value be converted to bool explicitly?
Yes, for example with the !! "operator".
CHECK_NONFATAL(!!boost::get<CNoDestination>(&dest) == scriptChange.empty());