sweep+lnrpc: add new interface FeePreference

This commit adds a new interface `FeePreference` which makes it easier
to write unit tests and allows more customized implementation in
following commits.
This commit is contained in:
yyforyongyu
2023-11-03 20:05:21 +08:00
parent 530eed92a0
commit 3bcac318eb
6 changed files with 108 additions and 21 deletions

View File

@@ -68,7 +68,7 @@ type Params struct {
// Fee is the fee preference of the client who requested the input to be
// swept. If a confirmation target is specified, then we'll map it into
// a fee rate whenever we attempt to cluster inputs for a sweep.
Fee FeeEstimateInfo
Fee FeePreference
// Force indicates whether the input should be swept regardless of
// whether it is economical to do so.
@@ -84,7 +84,7 @@ type ParamsUpdate struct {
// Fee is the fee preference of the client who requested the input to be
// swept. If a confirmation target is specified, then we'll map it into
// a fee rate whenever we attempt to cluster inputs for a sweep.
Fee FeeEstimateInfo
Fee FeePreference
// Force indicates whether the input should be swept regardless of
// whether it is economical to do so.