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

fix: delete orphans if they exist #4868

Merged

Conversation

SWvheerden
Copy link
Collaborator

Description

Orphans should be deleted from the orphan database if they exist.

Motivation and Context

If the block is added to the main chain, it should not exist in the orphan database as well. It will also remove the orphan tips if it removes the block from the pool.

How Has This Been Tested?

Unit test and manually running

fixes: #4867

Copy link
Member

@sdbondi sdbondi left a comment

Choose a reason for hiding this comment

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

Nice

@sdbondi
Copy link
Member

sdbondi commented Oct 31, 2022

ACK

Did a basic rewind and sync test

@stringhandler stringhandler merged commit 6ff1c02 into tari-project:development Oct 31, 2022
@SWvheerden SWvheerden deleted the sw_delete_orphans branch November 1, 2022 06:08
sdbondi added a commit to sdbondi/tari that referenced this pull request Nov 7, 2022
* development: (52 commits)
  chore: better help for seed-words command (tari-project#4885)
  fix(ci): resolve windows binary builds (tari-project#4883)
  fix(ci): correct ARM64 builds (tari-project#4876)
  fix(comms/peer_manager): fix possible panic in offline calc (tari-project#4877)
  feat!: impl final tari pow algorithm (tari-project#4862)
  fix(ci): selectively revert resolver for arm64 builds (tari-project#4871)
  chore(deps): bump actions/checkout from 2 to 3 (tari-project#4873)
  fix: delete orphans if they exist (tari-project#4868)
  chore: replace manual implementation of char methods (tari-project#4864)
  chore: fix potentially buggy split of string into lines (tari-project#4863)
  fix(ci): update GHA set-output plus dependabot schedule for GHA (tari-project#4857)
  fix(base-node): use less harsh emoji for unreachable node (tari-project#4855)
  fix(core): add txo version checks to async validator (tari-project#4852)
  feat: add static lifetime to emission amounts calculation (tari-project#4851)
  v0.38.8
  feat: add opcode versions (tari-project#4836)
  fix: remove clear_on_drop dependency (tari-project#4848)
  fix(base-node): use Network::from_str to parse network in cli (tari-project#4838)
  ci: remove circleci
  test: add cucumber critical (tari-project#4823)
  ...
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.

Base_node sync, should remove blocks from orphan db it syncs and not leave them in the orphan db
3 participants