File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -7787,6 +7787,16 @@ func (r *rpcServer) SendPayment(req *tchrpc.SendPaymentRequest,
77877787 "for keysend payment" )
77887788 }
77897789
7790+ // We must enforce a minimum satoshi amount to make sure the
7791+ // carrier HTLC is above dust. This is handled by the traffic
7792+ // shaper for invoice-based payments, but for keysend payments
7793+ // we need to do it here.
7794+ if pReq .Amt < int64 (rfqmath .DefaultOnChainHtlcSat ) {
7795+ return fmt .Errorf ("keysend payment satoshi amount " +
7796+ "must be greater than or equal to %d satoshis" ,
7797+ rfqmath .DefaultOnChainHtlcSat )
7798+ }
7799+
77907800 if len (req .PaymentRequest .Dest ) == 0 {
77917801 return fmt .Errorf ("destination node must be " +
77927802 "specified for keysend payment" )
You can’t perform that action at this time.
0 commit comments