Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Do nothing on duplicate log insert in contract watcher #141

Merged
merged 1 commit into from
Sep 23, 2019

Conversation

rmulhol
Copy link
Contributor

@rmulhol rmulhol commented Sep 21, 2019

  • Prevents duplicate key constraint violation from blocking the process
    from moving forward on restart.
  • If header_id, log_idx, and tx_idx are the same, we can safely do
    nothing since it's definitely the same log - a reorg would cause the
    original header to be replaced with a new ID.

Resolves #140

@rmulhol rmulhol changed the title Do nothing on duplicate log insert Do nothing on duplicate log insert in contract watcher Sep 21, 2019
Copy link
Contributor

@elizabethengelman elizabethengelman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 :shipit:

Copy link
Collaborator

@i-norden i-norden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

- Prevents duplicate key constraint violation from blocking the process
  from moving forward on restart.
- If header_id, log_idx, and tx_idx are the same, we can safely do
  nothing since it's definitely the same log - a reorg would cause the
  original header to be replaced with a new ID.
@rmulhol rmulhol force-pushed the contract-watcher-duplicate-inserts branch from 98f345d to 37e2673 Compare September 23, 2019 21:02
@rmulhol rmulhol merged commit a596966 into staging Sep 23, 2019
@rmulhol rmulhol deleted the contract-watcher-duplicate-inserts branch September 23, 2019 21:13
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.

Contract Watcher gets stuck on header after process killed
3 participants