forked from lthn/blockchain
wallet2: fixed a bug preventing PoS block creation when the UTXO defragmentation tx lacks decoy outputs
This commit is contained in:
parent
ee5c0fe787
commit
50afdacd39
1 changed files with 6 additions and 2 deletions
|
|
@ -6454,8 +6454,12 @@ bool wallet2::prepare_transaction(construct_tx_param& ctp, currency::finalize_tx
|
|||
TIME_MEASURE_START_MS(prepare_tx_sources_time);
|
||||
if (ctp.create_utxo_defragmentation_tx)
|
||||
{
|
||||
if (!prepare_tx_sources_for_defragmentation_tx(ftp.sources, ftp.selected_transfers, needed_money_map[currency::native_coin_asset_id].found_amount))
|
||||
return false;
|
||||
try
|
||||
{
|
||||
if (!prepare_tx_sources_for_defragmentation_tx(ftp.sources, ftp.selected_transfers, needed_money_map[currency::native_coin_asset_id].found_amount))
|
||||
return false;
|
||||
}
|
||||
catch(const error::not_enough_outs_to_mix&) { return false; } // if there's not enough decoys, return false to indicate minor non-fatal error
|
||||
}
|
||||
else if (ctp.htlc_tx_id != currency::null_hash)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue