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

ledger: restore block listeners on reloadLedger #6041

Merged
merged 5 commits into from
Jun 26, 2024

Conversation

algorandskiy
Copy link
Contributor

@algorandskiy algorandskiy commented Jun 26, 2024

Summary

Test Plan

Existing tests including TestNodeTxHandlerRestart and TestNodeTxSyncRestart passed locally.

* algorand#6039 discovered blockNotifier preserves state between
  ledger reloads that breaks assumptions on how trackers work
* Made node to clear and re-register block listeners explicitly
  on fast catchup.
* Also removed unused blockListeners argument from data.Ledger
gmalouf
gmalouf previously approved these changes Jun 26, 2024
Copy link

codecov bot commented Jun 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.89%. Comparing base (24382d8) to head (2c7d6b9).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6041      +/-   ##
==========================================
+ Coverage   55.87%   55.89%   +0.02%     
==========================================
  Files         482      482              
  Lines       68593    68592       -1     
==========================================
+ Hits        38324    38340      +16     
+ Misses      27658    27646      -12     
+ Partials     2611     2606       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

ledger/notifier.go Outdated Show resolved Hide resolved
node/node.go Outdated Show resolved Hide resolved
gmalouf
gmalouf previously approved these changes Jun 26, 2024
@algorandskiy algorandskiy changed the title node: register block listeners after fast catchup ledger: restore block listeners on reloadLedger Jun 26, 2024
gmalouf
gmalouf previously approved these changes Jun 26, 2024
ledger/ledger.go Show resolved Hide resolved
Copy link
Contributor

@jasonpaulos jasonpaulos left a comment

Choose a reason for hiding this comment

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

Simple enough but I wanted to clarify something for my own understanding

data/ledger.go Show resolved Hide resolved
@algorandskiy algorandskiy merged commit d3831cd into algorand:master Jun 26, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants