From 89c611d86bf06790a7919f110207191255704f71 Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Sat, 12 Jan 2013 00:58:00 +0100 Subject: [PATCH] Always use getLockTime in isFinal. --- core/src/main/java/com/google/bitcoin/core/Transaction.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/google/bitcoin/core/Transaction.java b/core/src/main/java/com/google/bitcoin/core/Transaction.java index 823400af..eaacd5b0 100644 --- a/core/src/main/java/com/google/bitcoin/core/Transaction.java +++ b/core/src/main/java/com/google/bitcoin/core/Transaction.java @@ -1033,9 +1033,10 @@ public class Transaction extends ChildMessage implements Serializable { */ public boolean isFinal(int height, long blockTimeSeconds) { // Time based nLockTime implemented in 0.1.6 - if (lockTime == 0) + long time = getLockTime(); + if (time == 0) return true; - if (lockTime < (lockTime < LOCKTIME_THRESHOLD ? height : blockTimeSeconds)) + if (time < (time < LOCKTIME_THRESHOLD ? height : blockTimeSeconds)) return true; for (TransactionInput in : inputs) if (in.hasSequence())