From 25097f09931ce127515a65f588e765247719f34a Mon Sep 17 00:00:00 2001 From: shaurya947 Date: Thu, 27 Apr 2023 18:51:55 -0400 Subject: [PATCH] sweep: update fee estimator fee-below-floor test case Handle error in test case, as well as add new test case for below relay fee input. --- sweep/walletsweep_test.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sweep/walletsweep_test.go b/sweep/walletsweep_test.go index 29800bb57..f2196fc89 100644 --- a/sweep/walletsweep_test.go +++ b/sweep/walletsweep_test.go @@ -43,12 +43,20 @@ func TestDetermineFeePerKw(t *testing.T) { // fail determines if this test case should fail or not. fail bool }{ - // A fee rate below the fee rate floor should output the floor. + // A fee rate below the floor should error out. { feePref: FeePreference{ FeeRate: chainfee.SatPerKWeight(99), }, - fee: chainfee.FeePerKwFloor, + fail: true, + }, + + // A fee rate below the relay fee should error out. + { + feePref: FeePreference{ + FeeRate: chainfee.SatPerKWeight(299), + }, + fail: true, }, // A fee rate above the floor, should pass through and return