jimmysong / programmingbitcoin

Repository for the book
Other
1.75k stars 656 forks source link

Evaluation of P2WPKH seems incorrect. #205

Closed SachinMeier closed 3 years ago

SachinMeier commented 3 years ago

https://github.com/jimmysong/programmingbitcoin/blob/3fba6b992ece443e4256df057595cfbe91edda75/code-ch13/script.py#L218

If the two items in the stack are 0 <20 byte hash>, the 0 should be popped first, followed by h160 = stack.pop()