HomePhabricator

Fix off-by-one errors in use of IsFinalTx()
665bdd3bc9baUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Fix off-by-one errors in use of IsFinalTx()

Previously CreateNewBlock() didn't take into account the fact that
IsFinalTx() without any arguments tests if the transaction is considered
final in the *current* block, when both those functions really needed to
know if the transaction would be final in the *next* block.

Additionally the UI had a similar misunderstanding.

Also adds some basic tests to check that CreateNewBlock() is in fact
mining nLockTime-using transactions correctly.

Thanks to Wladimir J. van der Laan for rebase.

Details

Provenance
Peter Todd <pete@petertodd.org>Authored on Jan 27 2014, 02:50
deadalnixPushed on May 14 2017, 22:04
Parents
rABCd0a94f2c2f12: Merge pull request #3571
Branches
Unknown
Tags
Unknown

Event Timeline

Peter Todd <pete@petertodd.org> committed rABC665bdd3bc9ba: Fix off-by-one errors in use of IsFinalTx() (authored by Peter Todd <pete@petertodd.org>).Jan 27 2014, 02:50