refactor select-utxos
:: Uses naive random selection. Should switch to branch-and-bound later
::
++ select-utxos
- ^- (unit (list input))
- =/ is=(list input)
+ |^ ^- (unit (list input))
+ %- single-random-draw
%- zing
- %+ turn ~(val by wach.w)
- |= =addi
+ (turn ~(val by wach.w) to-inputs)
+ ++ to-inputs
+ |= =addi ^- (list input)
%+ turn ~(tap in utxos.addi)
|=(=utxo:btc [utxo chyg.addi idx.addi])
- (single-random-draw is)
+ --
:: single-random-draw
:: randomly choose utxos until target is hit
:: only use an input if its net-value > 0
