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(orhpan-chain): verify node is synced before checking if it's orphan chain #1091

Merged
merged 5 commits into from
Nov 20, 2024

Conversation

MCozhusheck
Copy link
Collaborator

@MCozhusheck MCozhusheck commented Nov 20, 2024

Description

Check if node is synced before validating block hash against text explorer and fix bug where warning was shown even after node was no longer an orphan chain or when user had no internet connection.

Motivation and Context

Many users reported false positive where they had warning but they were sure it wasn't the case. This could be achieved if user disconnected internet connection and connected again.

How Has This Been Tested?

Disconnect WiFi, while disconnected there should be no warning.

Turn off Tor and check if there any peers connected - if not it means you are on the orphan chain.

Wait a while to mine some block and warning should pop up (It could take a while depending on the mining speed). You can also compare block height with the text explorer (the tip in the explorer should be higher)

What process can a PR reviewer use to test or verify this change?

Same as above.

Breaking Changes

  • None
  • Requires data directory on base node to be deleted
  • Requires hard fork
  • Other - Please specify

@MCozhusheck MCozhusheck marked this pull request as ready for review November 20, 2024 14:11
@brianp brianp merged commit 0fc0abb into tari-project:main Nov 20, 2024
9 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.

2 participants