itest: preparatory fee estimation changes

This commit is contained in:
Slyghtning committed 2024-03-05 09:24:27 +01:00
1 parent 7d9589ecbf
commit ef069b658d
5 files changed
+46 -41

No files matched your search

+13
View File
@@ -876,6 +876,19 @@ func (hn *HarnessNode) RestoreDB() error {
return nil
}
// UpdateGlobalPolicy updates a node's global channel policy.
func (hn *HarnessNode) UpdateGlobalPolicy(policy *lnrpc.RoutingPolicy) {
updateFeeReq := &lnrpc.PolicyUpdateRequest{
BaseFeeMsat: policy.FeeBaseMsat,
FeeRate: float64(policy.FeeRateMilliMsat) /
float64(1_000_000),
TimeLockDelta: policy.TimeLockDelta,
Scope: &lnrpc.PolicyUpdateRequest_Global{Global: true},
MaxHtlcMsat: policy.MaxHtlcMsat,
}
hn.RPC.UpdateChannelPolicy(updateFeeReq)
}
func postgresDatabaseDsn(dbName string) string {
return fmt.Sprintf(postgresDsn, dbName)
}