From 12b5fc780c7f35acc4789da5f3802acad27b9cfd Mon Sep 17 00:00:00 2001 From: Nguyen Sy Thanh Son Date: Fri, 8 Nov 2019 13:57:36 +0700 Subject: [PATCH] Revert "Followup of #806" --- core/blockchain.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index 6b20c54e5899..dd00cd9d28d7 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -2264,10 +2264,9 @@ func (bc *BlockChain) logExchangeData(block *types.Block) { for _, txMatchBatch := range txMatchBatchData { for _, txMatch := range txMatchBatch.Data { // the smallest time unit in mongodb is millisecond - // hence, we should update time in millisecond + // hence, we should update time in second // old txData has been attached with nanosecond, to avoid hard fork, convert nanosecond to millisecond here - milliSecond := txMatchBatch.Timestamp / 1e6 - txMatchTime := time.Unix(0, milliSecond * 1e6).UTC() + txMatchTime := time.Unix(txMatchBatch.Timestamp / 1e6, 0).UTC() if err := tomoXService.SyncDataToSDKNode(txMatch, txMatchBatch.TxHash, txMatchTime, currentState); err != nil { log.Error("failed to SyncDataToSDKNode ", "blockNumber", block.Number(), "err", err) return