itest: allow set fee rate with conf target
In this commit, we add a method in fee service to allow specifying a fee rate with a conf target.
This commit is contained in:
parent
614884dcb8
commit
a77225ba9e
@ -100,3 +100,11 @@ func (f *feeService) setFee(fee chainfee.SatPerKWeight) {
|
|||||||
|
|
||||||
f.Fees[feeServiceTarget] = uint32(fee.FeePerKVByte())
|
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())
|
||||||
|
}
|
||||||
|
@ -1512,6 +1512,12 @@ func (n *NetworkHarness) SetFeeEstimate(fee chainfee.SatPerKWeight) {
|
|||||||
n.feeService.setFee(fee)
|
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.
|
// CopyFile copies the file src to dest.
|
||||||
func CopyFile(dest, src string) error {
|
func CopyFile(dest, src string) error {
|
||||||
s, err := os.Open(src)
|
s, err := os.Open(src)
|
||||||
|
Loading…
Reference in New Issue
Block a user