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

Fix applying penalty on transaction processing error - Closes #4528 #4529

Merged
merged 2 commits into from Nov 19, 2019

Conversation

shuse2
Copy link
Member

@shuse2 shuse2 commented Nov 18, 2019

What was the problem?

If transaction fails on the processing, it was applying the penalty.
However, transaction processing can fail in various reason.

  • not synced
  • already processed
  • etc

How did I solve it?

  • Create error type for invalid transaction
  • Only apply error in case of this error

How to manually test it?

Try to send already processed transaction

Review checklist

@@ -922,7 +923,7 @@ describe('Transport', () => {
).toHaveBeenCalledTimes(2);
});

it('should apply penalty when validateTransactions fails', async () => {
it.only('should apply penalty when validateTransactions fails', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

only? 😏

Copy link
Member Author

Choose a reason for hiding this comment

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

😢

@shuse2 shuse2 force-pushed the 4528-fix_processing_transaction_penalty branch from 55b2ac5 to b2c1191 Compare November 18, 2019 15:37
@shuse2 shuse2 requested a review from 2snEM6 November 18, 2019 15:38
@shuse2 shuse2 force-pushed the 4528-fix_processing_transaction_penalty branch from bde5dab to 86fcf98 Compare November 18, 2019 21:48
@shuse2 shuse2 merged commit 9ae1a9e into development Nov 19, 2019
@shuse2 shuse2 deleted the 4528-fix_processing_transaction_penalty branch November 19, 2019 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Node should not apply penalty while processing transaction
3 participants