Skip to content

Commit

Permalink
Added of date for data commit entry to endpoint "ack"
Browse files Browse the repository at this point in the history
  • Loading branch information
bombadile authored and stackdump committed Sep 29, 2019
1 parent 85932f5 commit 61d1643
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions wsapi/ack.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 61d1643

Please sign in to comment.