Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce transaction status and error constraint #2198

Merged
merged 2 commits into from
Jul 1, 2019

Conversation

pasqu4le
Copy link
Contributor

@pasqu4le pasqu4le commented Jun 19, 2019

Motivation

Block invalidation can causes transactions to be refetched while previous internal transactions still exist, failing inserts/updates because of check constraints.

Because of this it is necessary to lift all checks on status and error, except the ones over block_hash (if NULL or not) and on status = 0 (or not).

Checklist for your PR

  • I added an entry to CHANGELOG.md with this PR
  • If I added new functionality, I added tests covering it.
  • If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
  • I checked whether I should update the docs and did so if necessary

@pasqu4le pasqu4le added the ready for review This PR is ready for reviews. label Jun 19, 2019
@pasqu4le pasqu4le self-assigned this Jun 19, 2019
@coveralls
Copy link

coveralls commented Jun 19, 2019

Pull Request Test Coverage Report for Build 58cbc661-1c9a-4d30-95b4-134d736a887b

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.03%) to 81.111%

Files with Coverage Reduction New Missed Lines %
apps/explorer/lib/explorer/chain/transaction.ex 1 84.0%
Totals Coverage Status
Change from base Build dbc300c4-e486-441e-ad9b-f378ec7fea2c: -0.03%
Covered Lines: 5110
Relevant Lines: 6300

💛 - Coveralls

vbaranov added a commit that referenced this pull request Jun 19, 2019
@ayrat555
Copy link
Contributor

tests are failing

@pasqu4le pasqu4le force-pushed the reduce-transaction-status-constraint branch 2 times, most recently from edd3511 to 2e1b6ea Compare June 20, 2019 12:54
@pasqu4le pasqu4le added in progress and removed ready for review This PR is ready for reviews. labels Jun 20, 2019
@pasqu4le pasqu4le force-pushed the reduce-transaction-status-constraint branch from 2e1b6ea to ac6da94 Compare June 20, 2019 15:18
@pasqu4le pasqu4le force-pushed the reduce-transaction-status-constraint branch from ac6da94 to afc7578 Compare June 20, 2019 16:20
@pasqu4le pasqu4le changed the title Reduce transaction status constraint Reduce transaction status and error constraint Jun 20, 2019
@pasqu4le pasqu4le added ready for review This PR is ready for reviews. and removed in progress labels Jun 20, 2019
vbaranov pushed a commit that referenced this pull request Jun 21, 2019
@vbaranov vbaranov requested review from Heimdell and removed request for zachdaniel June 22, 2019 15:03
vbaranov added a commit that referenced this pull request Jun 24, 2019
vbaranov added a commit that referenced this pull request Jun 27, 2019
@vbaranov vbaranov merged commit 618ff5e into master Jul 1, 2019
@vbaranov vbaranov deleted the reduce-transaction-status-constraint branch July 1, 2019 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review This PR is ready for reviews.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants