When encoding the witness length, an hex representation is used instead of compactSize integer. This bug only affects transactions with more than 127 elements so length becomes 0x80. In this case, the correct encoding is 0x0080 instead of 0x80.
The fix is pretty straight forward so I already opened a PR:
When encoding the witness length, an hex representation is used instead of compactSize integer. This bug only affects transactions with more than 127 elements so length becomes 0x80. In this case, the correct encoding is 0x0080 instead of 0x80.
The fix is pretty straight forward so I already opened a PR:
https://github.com/karask/python-bitcoin-utils/pull/97