diff --git a/lntest/fee_service.go b/lntest/fee_service.go index 4f61649cd..9f6634b0e 100644 --- a/lntest/fee_service.go +++ b/lntest/fee_service.go @@ -100,3 +100,11 @@ func (f *feeService) setFee(fee chainfee.SatPerKWeight) { f.Fees[feeServiceTarget] = uint32(fee.FeePerKVByte()) } + +// setFeeWithConf sets a fee for the given confirmation target. +func (f *feeService) setFeeWithConf(fee chainfee.SatPerKWeight, conf uint32) { + f.lock.Lock() + defer f.lock.Unlock() + + f.Fees[conf] = uint32(fee.FeePerKVByte()) +} diff --git a/lntest/harness.go b/lntest/harness.go index d6885ca1a..8ba49559f 100644 --- a/lntest/harness.go +++ b/lntest/harness.go @@ -1512,6 +1512,12 @@ func (n *NetworkHarness) SetFeeEstimate(fee chainfee.SatPerKWeight) { n.feeService.setFee(fee) } +func (n *NetworkHarness) SetFeeEstimateWithConf( + fee chainfee.SatPerKWeight, conf uint32) { + + n.feeService.setFeeWithConf(fee, conf) +} + // CopyFile copies the file src to dest. func CopyFile(dest, src string) error { s, err := os.Open(src)