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

TXM In-memory: step 3-01-SaveSentAttempt #12224

Merged
merged 7 commits into from
Mar 29, 2024

Conversation

poopoothegorilla
Copy link
Contributor

NOTES:

  • Implements SaveSentAttempt

Parent:

Copy link
Contributor

I see that you haven't updated any README files. Would it make sense to do so?

@poopoothegorilla poopoothegorilla marked this pull request as ready for review March 22, 2024 18:29
@poopoothegorilla poopoothegorilla requested a review from a team as a code owner March 22, 2024 18:29
Comment on lines 369 to 374
for i := range tx.TxAttempts {
if tx.TxAttempts[i].ID == attempt.ID {
tx.TxAttempts[i].State = txmgrtypes.TxAttemptBroadcast
return
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Can avoid indexing

Suggested change
for i := range tx.TxAttempts {
if tx.TxAttempts[i].ID == attempt.ID {
tx.TxAttempts[i].State = txmgrtypes.TxAttemptBroadcast
return
}
}
for _, txAttempt := range tx.TxAttempts {
if txAttempt.ID == attempt.ID {
txAttempt.State = txmgrtypes.TxAttemptBroadcast
return
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

great find! will switch to the for i :=0; i < _ ; i++ syntax to prevent the linter from complaining :)

Copy link
Contributor

@DylanTinianov DylanTinianov left a comment

Choose a reason for hiding this comment

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

Small nit, looks good though

@poopoothegorilla poopoothegorilla merged commit 6c0c773 into jtw/step-3-01 Mar 29, 2024
55 of 59 checks passed
@poopoothegorilla poopoothegorilla deleted the jtw/step-3-01-save-sent-attempt branch March 29, 2024 19:16
@cl-sonarqube-production
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

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.

3 participants