rust-bitcoin / rust-bech32

Bech32 format encoding and decoding
MIT License
93 stars 49 forks source link

InvalidWitnessVersion error display should convert fe to u8 #162

Closed apoelstra closed 8 months ago

apoelstra commented 8 months ago

Right now if we have an invalid witness version we print the field element directly, which will print it in the bech32 alphabet. This is confusing because, for example, the number 17 will be printed as "3".

We should convert it to a number by adding to_u8 before printing.