bitcore-lib icon indicating copy to clipboard operation
bitcore-lib copied to clipboard

isFinal check logic on input prototype is incorrect

Open kleetus opened this issue 7 years ago • 0 comments

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

kleetus avatar Mar 21 '17 12:03 kleetus