miner: move tx.isFinal.

This commit is contained in:
Christopher Jeffrey 2016-12-15 16:41:33 -08:00
parent 2e26909e85
commit 6b69e2bfad
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -420,12 +420,6 @@ Miner.prototype.build = function build(attempt) {
if (tx.isCoinbase())
throw new Error('Cannot add coinbase to block.');
if (!tx.isFinal(attempt.height, attempt.locktime))
continue;
if (!attempt.witness && tx.hasWitness())
continue;
for (j = 0; j < tx.inputs.length; j++) {
input = tx.inputs[j];
prev = input.prevout.hash;
@ -454,6 +448,9 @@ Miner.prototype.build = function build(attempt) {
weight = attempt.weight;
sigops = attempt.sigops;
if (!tx.isFinal(attempt.height, attempt.locktime))
continue;
if (!attempt.witness && tx.hasWitness())
continue;