mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-08 22:41:00 +02:00
sweep: allow updating all sweep parameters
This is a preparation for adding additional parameters besides the fee preference.
This commit is contained in:
@ -1178,7 +1178,9 @@ func TestBumpFeeRBF(t *testing.T) {
|
||||
|
||||
// We'll first try to bump the fee of an output currently unknown to the
|
||||
// UtxoSweeper. Doing so should result in a lnwallet.ErrNotMine error.
|
||||
bumpResult, err := ctx.sweeper.BumpFee(wire.OutPoint{}, lowFeePref)
|
||||
_, err := ctx.sweeper.UpdateParams(
|
||||
wire.OutPoint{}, Params{Fee: lowFeePref},
|
||||
)
|
||||
if err != lnwallet.ErrNotMine {
|
||||
t.Fatalf("expected error lnwallet.ErrNotMine, got \"%v\"", err)
|
||||
}
|
||||
@ -1206,12 +1208,14 @@ func TestBumpFeeRBF(t *testing.T) {
|
||||
ctx.estimator.blocksToFee[highFeePref.ConfTarget] = highFeeRate
|
||||
|
||||
// We should expect to see an error if a fee preference isn't provided.
|
||||
_, err = ctx.sweeper.BumpFee(*input.OutPoint(), FeePreference{})
|
||||
_, err = ctx.sweeper.UpdateParams(*input.OutPoint(), Params{})
|
||||
if err != ErrNoFeePreference {
|
||||
t.Fatalf("expected ErrNoFeePreference, got %v", err)
|
||||
}
|
||||
|
||||
bumpResult, err = ctx.sweeper.BumpFee(*input.OutPoint(), highFeePref)
|
||||
bumpResult, err := ctx.sweeper.UpdateParams(
|
||||
*input.OutPoint(), Params{Fee: highFeePref},
|
||||
)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to bump input's fee: %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user