fixed timestamp

This commit is contained in:
pinpong 2017-09-25 22:28:48 +02:00
parent 3c10351724
commit bc37ab7d47
2 changed files with 3 additions and 3 deletions

View File

@ -204,7 +204,7 @@ public class IotaAPICore {
txn.setBranchTransaction(previousTransaction == null ? branchTransaction : trunkTransaction);
if (txn.getTag().isEmpty() || txn.getTag().matches("9*"))
txn.setTag(txn.getObsoleteTag());
txn.setAttachmentTimestamp(System.currentTimeMillis() / 1000L);
txn.setAttachmentTimestamp(System.currentTimeMillis());
txn.setAttachmentTimestampLowerBound(0);
txn.setAttachmentTimestampUpperBound(3_812_798_742_493L);
resultTrytes[i] = localPoW.performPoW(txn.toTrytes(), minWeightMagnitude);
@ -329,7 +329,7 @@ public class IotaAPICore {
}
/**
* @param protocol
* @param localPoW
* @return
*/
public T localPoW(IotaLocalPoW localPoW) {

View File

@ -480,7 +480,7 @@ public class Transaction {
this.setTrunkTransaction(trytes.substring(2430, 2511));
this.setBranchTransaction(trytes.substring(2511, 2592));
this.setTag(trytes.substring(2592, 2619));
this.setAttachmentTimestamp(Converter.longValue(Arrays.copyOfRange(transactionTrits, 7857, 7884)) / 1000);
this.setAttachmentTimestamp(Converter.longValue(Arrays.copyOfRange(transactionTrits, 7857, 7884)));
this.setAttachmentTimestampLowerBound(Converter.longValue(Arrays.copyOfRange(transactionTrits, 7884, 7911)));
this.setAttachmentTimestampUpperBound(Converter.longValue(Arrays.copyOfRange(transactionTrits, 7911, 7938)));
this.setNonce(trytes.substring(2646, 2673));