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

bugfix: adding deletion of invalid txs from pool db in the finalizer. #1696

Merged
merged 1 commit into from
Feb 27, 2023

Conversation

Psykepro
Copy link
Contributor

Closes #1695

What does this PR do?

Adding missing deletion of invalid to process txs in finalizer from pool db.

Reviewers

Main reviewers:

Codeowner reviewers:

@Psykepro Psykepro self-assigned this Feb 24, 2023
@cla-bot cla-bot bot added the cla-signed label Feb 24, 2023
@Psykepro Psykepro force-pushed the bugfix/delete-invalid-txs-from-pool branch 2 times, most recently from 61fe998 to 6a47c1e Compare February 24, 2023 11:27
@@ -421,6 +421,10 @@ func (f *finalizer) handleTransactionError(ctx context.Context, result *state.Pr
log.Errorf("ROM out of counters error, marking tx with Hash: %s as INVALID, errorCode: %s", tx.Hash.String(), errorCode.String())
start := time.Now()
f.worker.DeleteTx(tx.Hash, tx.From)
err := f.dbManager.UpdateTxStatus(ctx, tx.Hash, pool.TxStatusFailed)
if err != nil {
log.Errorf("failed to delete tx from pool, err: %s", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

the log message must be "failed to update tx from pool, err:" (not "delete")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ops yep forgot to update the log

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will make it more explicit like that:
log.Errorf("failed to update status to failed in the pool for tx: %s, err: %s", tx.Hash.String(), err)

@Psykepro Psykepro force-pushed the bugfix/delete-invalid-txs-from-pool branch from 6a47c1e to 30410af Compare February 24, 2023 12:56
Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>
@Psykepro Psykepro force-pushed the bugfix/delete-invalid-txs-from-pool branch from 30410af to 32571ad Compare February 24, 2023 13:14
@Psykepro Psykepro merged commit 7ea3e76 into develop Feb 27, 2023
@tclemos tclemos deleted the bugfix/delete-invalid-txs-from-pool branch February 27, 2023 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add deletion of failed txs from the pool
4 participants