Closed youxiberlin closed 5 years ago
@youxiberlin any tips on how to reproduce this? I'm not able to reproduce when calling several times the endpoint
I can't reproduce this issue so far.
The controller sets the correct options:
{ sort: 'timestamp:desc', limit: 1, offset: 0, extended: true }
The query looks to be respecting those options:
SELECT trs."id" AS "id", b."height" AS "height", trs."blockId" AS "blockId", trs."type" AS "type", trs."timestamp" AS "timestamp", encode(trs."senderPublicKey", 'hex'::text) AS "senderPublicKey", upper(trs."senderId"::text) AS "senderId", upper(trs."recipientId"::text) AS "recipientId", trs."amount" AS "amount", trs."fee" AS "fee", encode(trs."signature", 'hex'::text) AS "signature", encode(trs."signSignature", 'hex'::text) AS "signSignature", regexp_split_to_array(trs."signatures", ',') as "signatures", trs."asset" AS "asset", trs."transferData" AS "transferData", (( SELECT blocks.height + 1 FROM blocks ORDER BY blocks.height DESC LIMIT 1)) - b.height AS "confirmations" FROM trs LEFT JOIN blocks AS b ON trs."blockId" = b.id ORDER BY "timestamp" DESC, trs."rowId" ASC LIMIT 1 OFFSET 0
transaction.timestamp
can be 0 but we tidebreak that with trs."rowId"
so I don't know how it's possible that you got different results.
@youxiberlin if you have extra steps to reproduce please comment on this issue else I would say let's close it @shuse2
We had this issue before. See https://github.com/LiskHQ/lisk-sdk/issues/1884
As #1884, we don't have tie breaker now, and cannot be done now.
Expected behavior
Latest transactions from Testnest API should be consistent.
Actual behavior
Latest transactions from Testnest API are not consistent and returns different transactions even when there are no new transactions.
Steps to reproduce
curl 'testnet.lisk.io:7000/api/transactions?sort=timestamp:desc&limit=1'
(paramlimit
is optional)