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

net: added disconnected state for shutdown #207

Merged

Conversation

edtubbs
Copy link
Collaborator

@edtubbs edtubbs commented Feb 23, 2024

Addresses two key issues:

  1. Ensures proper spvnode exit on dogecoin_node_group_shutdown.
  2. Updates dogecoin_btree_destroy for complete header tree freeing, removes redundant loop from dogecoin_headers_db_free and adds a stale header test in spv_tests.

@UsaRandom
Copy link

built and tested for my use-case. dogecoin_node_group_shutdown is now reliably closing the spv server without needing #206 !

i can close #206 if you like

@edtubbs
Copy link
Collaborator Author

edtubbs commented Feb 23, 2024

built and tested for my use-case. dogecoin_node_group_shutdown is now reliably closing the spv server without needing #206 !

i can close #206 if you like

Awesome, go for it!

@edtubbs edtubbs force-pushed the 0.1.4-dev-quit-disconnect branch 3 times, most recently from 3c6e223 to 39924ee Compare February 27, 2024 02:47
headersdb_file: added dogecoin_free to dogecoin_btree_tdestroy
headersdb_file: removed loop from chaintip to chainbottom
headersdb_file: added check for duplicate header
headersdb_file: updated to return blockindex
spv: updated invalid header case to free blockindex
spv: updated invalid header case for state change
spv: updated invalid block case with missbehaved state
spv: updated logging in invalid block case
utils: updated dogecoin_btree_tdestroy to free every node
test: added stale header to spv_tests
test: added duplicate header to spv_tests
@edtubbs edtubbs force-pushed the 0.1.4-dev-quit-disconnect branch from 39924ee to d321367 Compare March 8, 2024 22:07
Copy link
Member

@xanimo xanimo left a comment

Choose a reason for hiding this comment

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

ACK. Tested on 64-bit windows and ubuntu jammy on WSL.

@xanimo xanimo merged commit 8f150f6 into dogecoinfoundation:0.1.4-dev Mar 21, 2024
15 checks passed
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