Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bolt11: Don't push the size of the witness program for v1+ scripts
For non-v0 witness programs we weren't stripping the data push byte before writing into the fallback address. According to BIP14, all witness scripts will be data pushes (up to 40-bytes) so trimming the datapush byte should be kosher. From BIP141: A scriptPubKey (or redeemScript as defined in BIP16/P2SH) that consists of a 1-byte push opcode (for 0 to 16) followed by a data push between 2 and 40 bytes gets a new special meaning. The value of the first push is called the "version byte". The following byte vector pushed is called the "witness program". Changelog-Fixed: Adding a >0 version witness program to a fallback address now is *just* the witness program, as per bolt11 spec
- Loading branch information