[−][src]Function grin_wallet::libwallet::internal::selection::select_coins
pub fn select_coins<T: ?Sized, C, K>(
wallet: &mut T,
amount: u64,
current_height: u64,
minimum_confirmations: u64,
max_outputs: usize,
select_all: bool,
parent_key_id: &Identifier
) -> (usize, Vec<OutputData>) where
T: WalletBackend<C, K>,
C: NodeClient,
K: Keychain,
Select spendable coins from a wallet. Default strategy is to spend the maximum number of outputs (up to max_outputs). Alternative strategy is to spend smallest outputs first but only as many as necessary. When we introduce additional strategies we should pass something other than a bool in. TODO: Possibly move this into another trait to be owned by a wallet?