HomePhabricator

Fix off-by-one error w/ nLockTime in the wallet
28bf06236d3bUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Fix off-by-one error w/ nLockTime in the wallet

Previously due to an off-by-one error the wallet ignored
nLockTime-by-height transactions that would be valid in the next block
even though they are accepted into the mempool. The transactions
wouldn't show up until confirmed, nor would they be included in the
unconfirmed balance. Similar to the mempool behavior fix in 665bdd3b,
the wallet code was calling IsFinalTx() directly without taking into
account the fact that doing so tells you if the transaction could have
been mined in the *current* block, rather than the next block.

To fix this we strip IsFinalTx() of non-consensus-critical
functionality, removing the default arguments, and add CheckFinalTx() to
check if a transaction will be final in the next block.

Details

Provenance
Peter Todd <pete@petertodd.org>Authored on May 25 2015, 04:48
deadalnixPushed on May 14 2017, 22:04
Parents
rABCe1412d3e96ff: Merge pull request #6159
Branches
Unknown
Tags
Unknown

Event Timeline

Peter Todd <pete@petertodd.org> committed rABC28bf06236d3b: Fix off-by-one error w/ nLockTime in the wallet (authored by Peter Todd <pete@petertodd.org>).May 27 2015, 09:51