fix(cln): remove preimage reject in SendKeysend

CLN's keysend RPC derives its own preimage server-side and cln-grpc
has no override field. Rejecting non-empty preimages blocks NIP-47
pay_keysend entirely.

With this fix, CLN ignores the caller preimage (like LDK/LND already
do upstream — PayKeysendResponse carries only FeeMsat) and lets the
node choose. The recorded preimage in the transactions table is the
caller-derived one, not what the network used — this gap exists for
all backends and should be fixed separately in the response contract.
This commit is contained in:
welliv 2026-08-08 22:12:10 +00:00
parent 6175489cb0
commit 4c04dee365

View file

@ -2257,10 +2257,6 @@ func (c *CLNService) SendKeysend(amount uint64, destination string, customRecord
"preimage": preimage,
}).Debug("Send Keysend")
if preimage != "" {
return nil, errors.New("preimage not supported for keysends")
}
Destination, err := hex.DecodeString(destination)
if err != nil {
logger.Logger.WithError(err).Error("Failed to decode payee pubkey")