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

Don't Stop unstarted app in RebroadcastTransactions #8615

Merged
merged 11 commits into from
Mar 16, 2023

Conversation

martin-cll
Copy link
Contributor

The RebroadcastTransactions local command initializes an application, does not start it, and defers calling Stop on the app. The command uses some of the app's dependencies (e.g. keystore, chains, db), but does not need the apps' long lived services. Calling Stop on an unstarted application will panic (see here). As far as I can tell this panic will be thrown at the end of every invocation of this command.

This panic-if-not-started check was added much later after RebroadcastTransactions's calling Stop which itself was added about 3 years ago. It's possible that whatever reason the Stop was originally put in place is no longer relevant and this call site was missed when the started check was added.

This PR simply simply removes the Stop call which seems safe to do.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2023

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

jmank88
jmank88 previously approved these changes Mar 3, 2023
@martin-cll martin-cll requested a review from jmank88 March 6, 2023 23:18
@cl-sonarqube-production
Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@reductionista reductionista merged commit 7a5285b into develop Mar 16, 2023
@reductionista reductionista deleted the fix/dont-stop-unstarted-app branch March 16, 2023 01:35
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