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

Ignore orders in old blocks #806

Conversation

thanhnguyennguyen
Copy link

@thanhnguyennguyen thanhnguyennguyen commented Nov 7, 2019

Changes in this PR:

  • txMatchTime stores to mongodb in millisecond instead of nanosecond (reason: minimum unit time in mongodb is millisecond)
  • Ignore old orders:
    if ! txMatchTime.After(updatedTakerOrder.UpdatedAt) : ignore
  • Update orderHistoryItem key using crypto.Keccak256Hash(baseToken, quoteToken, orderId) instead of hashOf(pairName, orderId)
  • All times is in UTC

@thanhnguyennguyen thanhnguyennguyen force-pushed the ignore-orders-in-old-blocks branch from 1d7a67e to 6a62b20 Compare November 8, 2019 02:34
@thanhson1085 thanhson1085 merged commit 438e75e into BuildOnViction:tomoX Nov 8, 2019
thanhnguyennguyen added a commit to thanhnguyennguyen/tomochain-v1 that referenced this pull request Nov 8, 2019
thanhson1085 added a commit that referenced this pull request Nov 8, 2019
thanhson1085 added a commit that referenced this pull request Nov 8, 2019
thanhson1085 added a commit that referenced this pull request Nov 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants