I'm trying to add a simple time bounds with the Java SDK to settle a transaction happening at a certain time.

Code used :

Instant unlockDate = Instant.now().plusSeconds(60 * 2);
    TimeBounds timeBounds = new TimeBounds(unlockDate.getEpochSecond(), 0);
Transaction transaction = new Transaction.Builder(sourceAccount)
      .addOperation(new PaymentOperation.Builder(destination,
          new AssetTypeCreditAlphaNum12("xxx", issuer), amount).build())

But I get this error :

Exception in thread "main" java.lang.IllegalArgumentException: minTime must be >= maxTime

It seems you can't set the maxTime to 0 anymore.

Is there a workaround?

1 Answer 1


Thanks for catching this. It's a bug in Java SDK, please upgrade to 0.3.1 and it should be fixed.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.