sweep: create sweep parameters struct

Prepares for adding more input-specific sweep parameters.
This commit is contained in:
Joost Jager committed 2019-12-13 12:02:42 +01:00
1 parent e2bf6b49e9
commit 38adfd7ecc
8 files changed
+59 -36

No files matched your search

+4 -2
View File
@@ -201,7 +201,7 @@ type NurseryConfig struct {
Store NurseryStore
// Sweep sweeps an input back to the wallet.
SweepInput func(input.Input, sweep.FeePreference) (chan sweep.Result, error)
SweepInput func(input.Input, sweep.Params) (chan sweep.Result, error)
}
// utxoNursery is a system dedicated to incubating time-locked outputs created
@@ -778,7 +778,9 @@ func (u *utxoNursery) sweepMatureOutputs(classHeight uint32,
// passed in with disastrous consequences.
local := output
resultChan, err := u.cfg.SweepInput(&local, feePref)
resultChan, err := u.cfg.SweepInput(
&local, sweep.Params{Fee: feePref},
)
if err != nil {
return err
}