mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-29 07:27:05 +01:00
sweep: prevent default fee preference fallback
We want to make sure clients are aware of their own fee preferences, rather than relying on defaults.
This commit is contained in:
@@ -372,6 +372,12 @@ func assertTxFeeRate(t *testing.T, tx *wire.MsgTx,
|
||||
func TestSuccess(t *testing.T) {
|
||||
ctx := createSweeperTestContext(t)
|
||||
|
||||
// Sweeping an input without a fee preference should result in an error.
|
||||
_, err := ctx.sweeper.SweepInput( spendableInputs[0], FeePreference{})
|
||||
if err != ErrNoFeePreference {
|
||||
t.Fatalf("expected ErrNoFeePreference, got %v", err)
|
||||
}
|
||||
|
||||
resultChan, err := ctx.sweeper.SweepInput(
|
||||
spendableInputs[0], defaultFeePref,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user