BOLT 11 states that a reader "MUST skip over...`p`, `h`, `s` or `n`
fields that do NOT have data_lengths of 52, 52, 52 or 53,
respectively." Here we do so by simply ignoring any invalid-length
field.
Ok(field) => {
parts.push(RawTaggedField::KnownSemantics(field))
},
- Err(ParseError::Skip) => {
+ Err(ParseError::Skip)|Err(ParseError::Bech32Error(bech32::Error::InvalidLength)) => {
parts.push(RawTaggedField::UnknownSemantics(field.into()))
},
Err(e) => {return Err(e)}