mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2025-12-19 15:14:22 +01:00
lnrpc+routerrpc+lncli: add allow_self_payments safety flag
This commit is contained in:
@@ -665,6 +665,11 @@ func (r *RouterBackend) extractIntentFromSendRequest(
|
||||
|
||||
}
|
||||
|
||||
// Check for disallowed payments to self.
|
||||
if !rpcPayReq.AllowSelfPayment && payIntent.Target == r.SelfNode {
|
||||
return nil, errors.New("self-payments not allowed")
|
||||
}
|
||||
|
||||
return payIntent, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user