@@ -2100,17 +2100,22 @@ func (r *rpcServer) parseOpenChannelReq(in *lnrpc.OpenChannelRequest,
2100
2100
return nil , fmt .Errorf ("cannot open channel to self" )
2101
2101
}
2102
2102
2103
- // Calculate an appropriate fee rate for this transaction.
2104
- feeRate , err := lnrpc .CalculateFeeRate (
2105
- uint64 (in .SatPerByte ), in .SatPerVbyte , // nolint:staticcheck
2106
- uint32 (in .TargetConf ), r .server .cc .FeeEstimator ,
2107
- )
2108
- if err != nil {
2109
- return nil , err
2110
- }
2103
+ var feeRate chainfee.SatPerKWeight
2111
2104
2112
- rpcsLog .Debugf ("[openchannel]: using fee of %v sat/kw for funding tx" ,
2113
- int64 (feeRate ))
2105
+ // Skip estimating fee rate for PSBT funding.
2106
+ if in .FundingShim == nil || in .FundingShim .GetPsbtShim () == nil {
2107
+ // Calculate an appropriate fee rate for this transaction.
2108
+ feeRate , err = lnrpc .CalculateFeeRate (
2109
+ uint64 (in .SatPerByte ), in .SatPerVbyte ,
2110
+ uint32 (in .TargetConf ), r .server .cc .FeeEstimator ,
2111
+ )
2112
+ if err != nil {
2113
+ return nil , err
2114
+ }
2115
+
2116
+ rpcsLog .Debugf ("[openchannel]: using fee of %v sat/kw for " +
2117
+ "funding tx" , int64 (feeRate ))
2118
+ }
2114
2119
2115
2120
script , err := chancloser .ParseUpfrontShutdownAddress (
2116
2121
in .CloseAddress , r .cfg .ActiveNetParams .Params ,
0 commit comments