3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-31 07:12:17 +00:00

Always use getLockTime in isFinal.

This commit is contained in:
Mike Hearn 2013-01-12 00:58:00 +01:00
parent a6f1233b4e
commit 89c611d86b

View File

@ -1033,9 +1033,10 @@ public class Transaction extends ChildMessage implements Serializable {
*/ */
public boolean isFinal(int height, long blockTimeSeconds) { public boolean isFinal(int height, long blockTimeSeconds) {
// Time based nLockTime implemented in 0.1.6 // Time based nLockTime implemented in 0.1.6
if (lockTime == 0) long time = getLockTime();
if (time == 0)
return true; return true;
if (lockTime < (lockTime < LOCKTIME_THRESHOLD ? height : blockTimeSeconds)) if (time < (time < LOCKTIME_THRESHOLD ? height : blockTimeSeconds))
return true; return true;
for (TransactionInput in : inputs) for (TransactionInput in : inputs)
if (in.hasSequence()) if (in.hasSequence())