From 61d1643b22fb2797590c6276636feba8f01fb254 Mon Sep 17 00:00:00 2001 From: Michael Suchkov Date: Mon, 22 Jul 2019 13:48:47 +0400 Subject: [PATCH] Added of date for data commit entry to endpoint "ack" --- wsapi/ack.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/wsapi/ack.go b/wsapi/ack.go index 7c6e1a759a..01fbfad792 100644 --- a/wsapi/ack.go +++ b/wsapi/ack.go @@ -185,6 +185,16 @@ func handleAckByEntryHash(hash interfaces.IHash, state interfaces.IState) (inter answer.CommitTxID = txid.String() answer.CommitData.Status = constants.AckStatusString(constants.AckStatusDBlockConfirmed) } + _, _, txTime, _, err := state.GetSpecificACKStatus(txid) + if err != nil { + return nil, NewInternalError() + } + if txTime != nil { + answer.CommitData.TransactionDate = txTime.GetTimeMilli() + if txTime.GetTimeMilli() > 0 { + answer.CommitData.TransactionDateString = txTime.String() + } + } // Now we will exit, as any commit found below will be less than dblock confirmed. return answer, nil