TimeBounds won't execute?
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I struggle using the timebounds option for an operation.
Use case : I want a transaction to be executed at a precise time, not before, not after.
I'm doing my tests on the test network.
The transaction occured when I don't set a timeBounds, but when I do I get the same result without (except that my tokens aren't sent).
Here's the code I use :
String timeBounds = "1534239756";
TimeBounds timeBoundsT = new TimeBounds(Long.parseLong(timeBounds), 0);
transaction = new Transaction.Builder(sourceAccount)
.addOperation(new PaymentOperation.Builder(destination,
new AssetTypeCreditAlphaNum12(assetName, issuer), amount).build())
.addTimeBounds(timeBoundsT).addMemo(Memo.text("Memo")).build();
// Sign the transaction to prove you are actually the person sending it.
transaction.sign(distributor);
// And finally, send it off to Stellar!
SubmitTransactionResponse response = null;
try
response = server.submitTransaction(transaction);
System.out.println("Success!");
System.out.println(response);
catch (Exception e)
System.out.println("Something went wrong!");
System.out.println(e.getMessage());
Here's my response :
Success!
org.stellar.sdk.responses.SubmitTransactionResponse@3deb2326
Any idea?
java-sdk
add a comment |Â
up vote
2
down vote
favorite
I struggle using the timebounds option for an operation.
Use case : I want a transaction to be executed at a precise time, not before, not after.
I'm doing my tests on the test network.
The transaction occured when I don't set a timeBounds, but when I do I get the same result without (except that my tokens aren't sent).
Here's the code I use :
String timeBounds = "1534239756";
TimeBounds timeBoundsT = new TimeBounds(Long.parseLong(timeBounds), 0);
transaction = new Transaction.Builder(sourceAccount)
.addOperation(new PaymentOperation.Builder(destination,
new AssetTypeCreditAlphaNum12(assetName, issuer), amount).build())
.addTimeBounds(timeBoundsT).addMemo(Memo.text("Memo")).build();
// Sign the transaction to prove you are actually the person sending it.
transaction.sign(distributor);
// And finally, send it off to Stellar!
SubmitTransactionResponse response = null;
try
response = server.submitTransaction(transaction);
System.out.println("Success!");
System.out.println(response);
catch (Exception e)
System.out.println("Something went wrong!");
System.out.println(e.getMessage());
Here's my response :
Success!
org.stellar.sdk.responses.SubmitTransactionResponse@3deb2326
Any idea?
java-sdk
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I struggle using the timebounds option for an operation.
Use case : I want a transaction to be executed at a precise time, not before, not after.
I'm doing my tests on the test network.
The transaction occured when I don't set a timeBounds, but when I do I get the same result without (except that my tokens aren't sent).
Here's the code I use :
String timeBounds = "1534239756";
TimeBounds timeBoundsT = new TimeBounds(Long.parseLong(timeBounds), 0);
transaction = new Transaction.Builder(sourceAccount)
.addOperation(new PaymentOperation.Builder(destination,
new AssetTypeCreditAlphaNum12(assetName, issuer), amount).build())
.addTimeBounds(timeBoundsT).addMemo(Memo.text("Memo")).build();
// Sign the transaction to prove you are actually the person sending it.
transaction.sign(distributor);
// And finally, send it off to Stellar!
SubmitTransactionResponse response = null;
try
response = server.submitTransaction(transaction);
System.out.println("Success!");
System.out.println(response);
catch (Exception e)
System.out.println("Something went wrong!");
System.out.println(e.getMessage());
Here's my response :
Success!
org.stellar.sdk.responses.SubmitTransactionResponse@3deb2326
Any idea?
java-sdk
I struggle using the timebounds option for an operation.
Use case : I want a transaction to be executed at a precise time, not before, not after.
I'm doing my tests on the test network.
The transaction occured when I don't set a timeBounds, but when I do I get the same result without (except that my tokens aren't sent).
Here's the code I use :
String timeBounds = "1534239756";
TimeBounds timeBoundsT = new TimeBounds(Long.parseLong(timeBounds), 0);
transaction = new Transaction.Builder(sourceAccount)
.addOperation(new PaymentOperation.Builder(destination,
new AssetTypeCreditAlphaNum12(assetName, issuer), amount).build())
.addTimeBounds(timeBoundsT).addMemo(Memo.text("Memo")).build();
// Sign the transaction to prove you are actually the person sending it.
transaction.sign(distributor);
// And finally, send it off to Stellar!
SubmitTransactionResponse response = null;
try
response = server.submitTransaction(transaction);
System.out.println("Success!");
System.out.println(response);
catch (Exception e)
System.out.println("Something went wrong!");
System.out.println(e.getMessage());
Here's my response :
Success!
org.stellar.sdk.responses.SubmitTransactionResponse@3deb2326
Any idea?
java-sdk
edited Aug 14 at 9:59
asked Aug 14 at 9:54
Brice Faller
475
475
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
4
down vote
accepted
If you'd like a transaction executed at a precise time, you need to submit it at that time.
The unix timestamp 1534239756
is in the past at the time you wrote this question (by about 10 minutes?). I suspect the transaction was successful.
To be certain, you should check the ResultXDR from the result.
response = server.submitTransaction(transaction);
System.out.println(response.getResultXdr());
Inspect that value in the lab.
So you can't prepar transactions to execute at a certain time? I get "result: [txTooEarly]" when the transaction is done before the timeBounds, which is correct. Is there any possibilities to lock the distributor account until a precise time?
â Brice Faller
Aug 14 at 12:16
add a comment |Â
up vote
2
down vote
Timebounds only tell the system when a transaction should be valid, it does nothing to submit things at a certain time.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
If you'd like a transaction executed at a precise time, you need to submit it at that time.
The unix timestamp 1534239756
is in the past at the time you wrote this question (by about 10 minutes?). I suspect the transaction was successful.
To be certain, you should check the ResultXDR from the result.
response = server.submitTransaction(transaction);
System.out.println(response.getResultXdr());
Inspect that value in the lab.
So you can't prepar transactions to execute at a certain time? I get "result: [txTooEarly]" when the transaction is done before the timeBounds, which is correct. Is there any possibilities to lock the distributor account until a precise time?
â Brice Faller
Aug 14 at 12:16
add a comment |Â
up vote
4
down vote
accepted
If you'd like a transaction executed at a precise time, you need to submit it at that time.
The unix timestamp 1534239756
is in the past at the time you wrote this question (by about 10 minutes?). I suspect the transaction was successful.
To be certain, you should check the ResultXDR from the result.
response = server.submitTransaction(transaction);
System.out.println(response.getResultXdr());
Inspect that value in the lab.
So you can't prepar transactions to execute at a certain time? I get "result: [txTooEarly]" when the transaction is done before the timeBounds, which is correct. Is there any possibilities to lock the distributor account until a precise time?
â Brice Faller
Aug 14 at 12:16
add a comment |Â
up vote
4
down vote
accepted
up vote
4
down vote
accepted
If you'd like a transaction executed at a precise time, you need to submit it at that time.
The unix timestamp 1534239756
is in the past at the time you wrote this question (by about 10 minutes?). I suspect the transaction was successful.
To be certain, you should check the ResultXDR from the result.
response = server.submitTransaction(transaction);
System.out.println(response.getResultXdr());
Inspect that value in the lab.
If you'd like a transaction executed at a precise time, you need to submit it at that time.
The unix timestamp 1534239756
is in the past at the time you wrote this question (by about 10 minutes?). I suspect the transaction was successful.
To be certain, you should check the ResultXDR from the result.
response = server.submitTransaction(transaction);
System.out.println(response.getResultXdr());
Inspect that value in the lab.
answered Aug 14 at 10:51
Synessoâ¦
1,724221
1,724221
So you can't prepar transactions to execute at a certain time? I get "result: [txTooEarly]" when the transaction is done before the timeBounds, which is correct. Is there any possibilities to lock the distributor account until a precise time?
â Brice Faller
Aug 14 at 12:16
add a comment |Â
So you can't prepar transactions to execute at a certain time? I get "result: [txTooEarly]" when the transaction is done before the timeBounds, which is correct. Is there any possibilities to lock the distributor account until a precise time?
â Brice Faller
Aug 14 at 12:16
So you can't prepar transactions to execute at a certain time? I get "result: [txTooEarly]" when the transaction is done before the timeBounds, which is correct. Is there any possibilities to lock the distributor account until a precise time?
â Brice Faller
Aug 14 at 12:16
So you can't prepar transactions to execute at a certain time? I get "result: [txTooEarly]" when the transaction is done before the timeBounds, which is correct. Is there any possibilities to lock the distributor account until a precise time?
â Brice Faller
Aug 14 at 12:16
add a comment |Â
up vote
2
down vote
Timebounds only tell the system when a transaction should be valid, it does nothing to submit things at a certain time.
add a comment |Â
up vote
2
down vote
Timebounds only tell the system when a transaction should be valid, it does nothing to submit things at a certain time.
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Timebounds only tell the system when a transaction should be valid, it does nothing to submit things at a certain time.
Timebounds only tell the system when a transaction should be valid, it does nothing to submit things at a certain time.
answered Aug 14 at 11:14
Johan Stén
6308
6308
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstellar.stackexchange.com%2fquestions%2f1433%2ftimebounds-wont-execute%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password