bitpay / bitcore

A full stack for bitcoin and blockchain-based applications
https://bitcore.io/
MIT License
4.83k stars 2.08k forks source link

Typo in the script parser #3513

Open supertestnet opened 1 year ago

supertestnet commented 1 year ago

In this line: https://github.com/bitpay/bitcore/blob/master/packages/bitcore-lib/lib/script/interpreter.js#L405

I believe there is a typo whereby the flag number for SCRIPT_VERIFY_CHECKSEQUENCEVERIFY is 10 instead of 12. When this flag is used, it behaves identically to Interpreter.SCRIPT_VERIFY_WITNESS because their flag number is the same. When you read the list of flags on that page, they all increment by 1 from the previous except in that case, where the number is a repeat which is identical to SCRIPT_VERIFY_CHECKSEQUENCEVERIFY.