fn choose_transaction_weighted_random(
    candidate_txs: &mut Vec<VerifiedUnminedTx>,
    weighted_index: WeightedIndex<f32>,
) -> (Option<WeightedIndex<f32>>, VerifiedUnminedTx)
Expand description

Choose a transaction from transactions, using the previously set up weighted_index.

If some transactions have not yet been chosen, returns the weighted index and the transaction. Otherwise, just returns the transaction.