karask / python-bitcoin-utils

Library to interact with the Bitcoin network. Ideal for low-level learning and experimenting.
MIT License
271 stars 102 forks source link

Handle ControlBlock Sign Bit #64

Closed jonasmartin closed 6 months ago

jonasmartin commented 7 months ago

Hi @karask

I was facing some problems when I was trying to reveal a script from a taproot with this error: -26: non-mandatory-script-verify-flag (Witness program hash mismatch)

I think it might be related with this pending todo: https://github.com/karask/python-bitcoin-utils/blob/master/TODO#L13 that I'm trying to address here.

Also I think it might be related with this issue: https://github.com/karask/python-bitcoin-utils/issues/63

I'm not 100% sure if this is the proper solution but at least, it fixes the problem for me.

karask commented 6 months ago

Hi @jonasmartin

Thanks for this! I will check the BIP and review as soon as possible.

karask commented 6 months ago

Everything seems in order. Merged and thanks for the contribution.