Skip to content
This repository was archived by the owner on May 25, 2020. It is now read-only.

Commit e84311f

Browse files
authored
Merge pull request #809 from tomochain/revert-807-followup-#806
Revert "Followup of #806"
2 parents f9a4ee8 + 12b5fc7 commit e84311f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

core/blockchain.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2264,10 +2264,9 @@ func (bc *BlockChain) logExchangeData(block *types.Block) {
22642264
for _, txMatchBatch := range txMatchBatchData {
22652265
for _, txMatch := range txMatchBatch.Data {
22662266
// the smallest time unit in mongodb is millisecond
2267-
// hence, we should update time in millisecond
2267+
// hence, we should update time in second
22682268
// old txData has been attached with nanosecond, to avoid hard fork, convert nanosecond to millisecond here
2269-
milliSecond := txMatchBatch.Timestamp / 1e6
2270-
txMatchTime := time.Unix(0, milliSecond * 1e6).UTC()
2269+
txMatchTime := time.Unix(txMatchBatch.Timestamp / 1e6, 0).UTC()
22712270
if err := tomoXService.SyncDataToSDKNode(txMatch, txMatchBatch.TxHash, txMatchTime, currentState); err != nil {
22722271
log.Error("failed to SyncDataToSDKNode ", "blockNumber", block.Number(), "err", err)
22732272
return

0 commit comments

Comments
 (0)