Missing blocktime in listaddresstransactions

+1 vote
Hi MultiChain Team,

I was trying MultiChain for the "sendwithmetadata" command. After sending the transactions, I then used "listaddresstransactions" to retrieve the transactions. For most of the transactions, I could get the "blocktime" field and parse the time. However, sometimes (usually the last transaction) the "blocktime" field was missing (but the "time" and "timereceived" fields were present). Could you kindly provide suggestions about how to make sure the "blocktime" field appears everytime?

Thank you very much!
related to an answer for: How can I get the time for a transaction
asked Jan 18, 2017 by Tsung-Ting Kuo

1 Answer

+1 vote
 
Best answer

If a transaction has not yet been confirmed in a block, because it is too new, then there will be no blocktime field. The blocktime is the timestamp taken from the header of the block in which the transaction is confirmed.

answered Jan 19, 2017 by MultiChain
selected Jan 26, 2017 by Tsung-Ting Kuo
This makes sense and is what I was guessing. Thank you very much!
...