Skip to content

cuprated: stop the block downloader when shutting down - #703

Open
redsh4de wants to merge 2 commits into
Cuprate:mainfrom
redsh4de:fix/downloader-panic
Open

cuprated: stop the block downloader when shutting down#703
redsh4de wants to merge 2 commits into
Cuprate:mainfrom
redsh4de:fix/downloader-panic

Conversation

@redsh4de

@redsh4de redsh4de commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

What

Ensures the block downloader task is stopped as the node is shutting down to prevent a panic on graceful shutdown

Where

cuprated, p2p

How

Return the spawned downloader task and abort it as we break out of the syncer loop when shutting down

@github-actions github-actions Bot added A-p2p Area: Related to P2P. A-consensus Area: Related to consensus. A-binaries Area: Related to binaries. labels Sep 8, 2026
Comment thread binaries/cuprated/src/blockchain/syncer.rs

@SyntheticBird45 SyntheticBird45 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i don't like the tuple being handed around, but apart from that LGTM

@redsh4de

redsh4de commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Thoughts on wrapping the stream and task into a BlockDownloaderHandle so it's not a tuple?

@SyntheticBird45

Copy link
Copy Markdown
Member

Thoughts on wrapping the stream and task into a BlockDownloaderHandle so it's not a tuple?

i'm all for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-binaries Area: Related to binaries. A-consensus Area: Related to consensus. A-p2p Area: Related to P2P.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants