Potential issue with PSBT deserialization code
Closed this issue · 1 comments
hax0kartik commented
Hello, while reading Drongo's src code I have come across a potential issue.
Drongo's PSBTEntry constructor is incorrectly implemented as it assumes the keyType
to be a single byte. However, according to BIP 174, keyType
is a compactInt
.
Here's the relevant code in btc core.
craigraw commented
Thanks for pointing this out. Fixed in d73d343. Drongo will now successfully parse keyType
entries that are larger than a single byte. Since there are no known types that use these large numbers it will simply log a warning, but it is certainly better than failing to parse the PSBT.