mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-24 15:02:20 +01:00
Merge pull request #3185 from tnull/2024-07-clarify-max-description-length
Clarify maximum length of an invoice description
This commit is contained in:
commit
dee3ba7d6a
1 changed files with 2 additions and 2 deletions
|
@ -1510,8 +1510,8 @@ impl TaggedField {
|
|||
|
||||
impl Description {
|
||||
|
||||
/// Creates a new `Description` if `description` is at most 1023 __bytes__ long,
|
||||
/// returns [`CreationError::DescriptionTooLong`] otherwise
|
||||
/// Creates a new `Description` if `description` is at most 1023 * 5 bits (i.e., 639 bytes)
|
||||
/// long, and returns [`CreationError::DescriptionTooLong`] otherwise.
|
||||
///
|
||||
/// Please note that single characters may use more than one byte due to UTF8 encoding.
|
||||
pub fn new(description: String) -> Result<Description, CreationError> {
|
||||
|
|
Loading…
Add table
Reference in a new issue