Transaction: Fix incorrect condition for log message in setLockTime.

This commit is contained in:
mruddy 2016-03-12 13:14:59 -05:00 committed by Andreas Schildbach
parent 0bc6c04d5f
commit 910544ae57

View file

@ -1048,7 +1048,7 @@ public class Transaction extends ChildMessage {
break; break;
} }
} }
if (!seqNumSet || inputs.isEmpty()) { if (lockTime != 0 && (!seqNumSet || inputs.isEmpty())) {
// At least one input must have a non-default sequence number for lock times to have any effect. // At least one input must have a non-default sequence number for lock times to have any effect.
// For instance one of them can be set to zero to make this feature work. // For instance one of them can be set to zero to make this feature work.
log.warn("You are setting the lock time on a transaction but none of the inputs have non-default sequence numbers. This will not do what you expect!"); log.warn("You are setting the lock time on a transaction but none of the inputs have non-default sequence numbers. This will not do what you expect!");