Skip to content

Commit

Permalink
Merge pull request #3185 from tnull/2024-07-clarify-max-description-l…
Browse files Browse the repository at this point in the history
…ength

Clarify maximum length of an invoice description
  • Loading branch information
TheBlueMatt committed Jul 16, 2024
2 parents 6e73c37 + fa7ecc5 commit dee3ba7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lightning-invoice/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down

0 comments on commit dee3ba7

Please sign in to comment.