moneroexamples / onion-monero-blockchain-explorer

Onion Monero Blockchain Explorer
https://xmrchain.net
BSD 3-Clause "New" or "Revised" License
361 stars 269 forks source link

Transaction with an unlock_time has 0 as tx_confirmations and tx_timestamp in the outputs endpoint #295

Open Olsm opened 11 months ago

Olsm commented 11 months ago

For a locked transaction with an unlock_time set, in the outputs endpoint the "tx_confirmations" is 0 and the "tx_timestamp" is 0, but in the transaction endpoint the "confirmations" is 218170 and the timestamp is 1668901942. Is there a reason for that or is it a bug?

moneroexamples commented 11 months ago

Can you provide more details or screenshot? Its not clear to me what you are referring to. Is it about the explorer's API?

Olsm commented 11 months ago

Yes it is about the API. See an example below:

"api/outputs?txhash=&address=&viewkey=&txprove=0" for the tx gives this response for a transaction that has unlock_time not 0 in "api/rawtransaction/":

bilde

Notice that 'tx_confirmations' is 0 and 'tx_timestamp' is 0.

In "api/transaction/" the confirms and timestamp exists in 'confirmations' and 'timestamp' instead of being 0.

moneroexamples commented 11 months ago

I have difficulties replicating the issue. Does this happen for every transaction for you, or is it for new txs (e.g. in mempool) only?