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

Commit

Permalink
Merge pull request #809 from tomochain/revert-807-followup-#806
Browse files Browse the repository at this point in the history
Revert "Followup of #806"
  • Loading branch information
thanhson1085 authored Nov 8, 2019
2 parents f9a4ee8 + 12b5fc7 commit e84311f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e84311f

Please sign in to comment.