Bucketing is generalization of coin chooser logic that makes it easy to implement other algorithms. - Put core coin chooser functionality in base class. - Specialize derived class to implement classic electrum algorithm of oldest coins first. One bucket per output. No intended change in behaviour. Coin chooser now sorts the coins as it wants; remove redundant sorting from get_spendable_coins().
4.6 KiB
4.6 KiB