bitcore-lib
bitcore-lib copied to clipboard
isFinal check logic on input prototype is incorrect
Finality of a bitcoin transaction, as of this writing, is partially a function of the values of the nSequence fields in the transaction. In this context, if any of the nSequence values in any of the transaction inputs are not equal to 4294967295, then the entire transaction is not Final. Therefore, the logic here would not be correct:
https://github.com/bitpay/bitcore-lib/blob/master/lib/transaction/input/input.js#L160
Here is the reference implementation for comparison:
https://github.com/bitcoin/bitcoin/blob/master/src/validation.cpp#L229