lightningdevkit / ldk-node

A ready-to-go node implementation built using LDK.
Other
140 stars 72 forks source link

Default to description hash if description is too long #312

Open tnull opened 2 months ago

tnull commented 2 months ago

Currently, if users provide a description is too long, we would provide a DescriptionTooLong error.

However, we previously received user requests that need to fallback on a description hash in that case. Since we probably don't want to add more methods/parameters to switch the behavior, we should just fall back to using a description hash if the given string is too long.

We should however properly document this, as it might come to some users as a surprise that the actual description string is suddenly missing from the resulting invoice.