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

DataSent and DataQueued events should be handled gracefully in the TransferFinished state #234

Closed
aarshkshah1992 opened this issue Aug 18, 2021 · 0 comments · Fixed by #233

Comments

@aarshkshah1992
Copy link
Collaborator

aarshkshah1992 commented Aug 18, 2021

  • After a data-transfer restart, Graphsync can still call the OnDataSent hook for blocks that have already been sent which in turn will fire the DataSent data-transfer event. The same applies to the DataQueued event.
  • To ensure we don't double count data sent, we introduced a DataSentProgress and a DataQueuedProgress events a while ago in Dont double count data sent #185. These events are only emitted the first time we send a block to a remote peer.
  • Thus, if a data-transfer restarts after entering the TransferFinished state, we can still receive DataSent and DataQueued events for blocks that have already been sent. We need to handle these events gracefully in the TransferFinished state.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant