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:can't switch sync mode when no snap-sync peer #848

Merged
merged 3 commits into from
Dec 12, 2024

Conversation

lochjin
Copy link
Collaborator

@lochjin lochjin commented Dec 12, 2024

No description provided.

@lochjin lochjin requested a review from dindinw December 12, 2024 07:52
@@ -686,6 +691,7 @@ func DefaultConfig(homeDir string) *config.Config {
SubmitNoSynced: false,
DevNextGDB: true,
GBTTimeOut: defaultGBTTimeout,
SnapTimeout: 300,
Copy link
Contributor

Choose a reason for hiding this comment

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

Better to add extra defaultSnapTimeout after line 43 : defaultGBTTimeout = 800

config/config.go Outdated
@@ -144,6 +144,8 @@ type Config struct {

// TODO: It will soon be discarded in the near future
DevSnapSync bool `long:"devsnapsync" description:"Enable snap sync for P2P that only exist in development mode"`

SnapTimeout int `long:"snaptimeout" description:"Unable to find a peer that supports snap-sync service for setting IBD timeout(seconds), it will switch to the normal sync method"`
Copy link
Contributor

Choose a reason for hiding this comment

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

SnapTimeout -> FindSnapSyncPeerTimeout
a better description, During the IBD phase, if no peer node with snap-sync service enabled is found after the timeout (seconds), the node will switch to using the normal sync method.

Copy link
Contributor

Choose a reason for hiding this comment

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

or NoSnapSyncPeerTimeout is also OK for me

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@dindinw dindinw left a comment

Choose a reason for hiding this comment

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

Some textual revisions

@dindinw dindinw merged commit 3d3a18d into Qitmeer:dev/2.0 Dec 12, 2024
3 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