Skip to content

client/dcr: Create new syncer on Run error. - #3215

Merged
buck54321 merged 1 commit into
decred:masterfrom
JoeGruffins:fixsyncpanic
Apr 1, 2025
Merged

client/dcr: Create new syncer on Run error.#3215
buck54321 merged 1 commit into
decred:masterfrom
JoeGruffins:fixsyncpanic

Conversation

@JoeGruffins

Copy link
Copy Markdown
Member

closes #3208

Comment thread client/asset/dcr/spv.go Outdated
Comment on lines +427 to +431
syncer, err := w.newSpvSyncer()
if err != nil {
w.log.Errorf("unable to create spv syncer: %v", err)
return
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If newSpvSyncer returns an error, this loop will never restart, startWallet will return without error, and the wallet will remain connected. newSpvSyncer doesn't need to return an error though. The only case it returns an error is if dcrWallet is not an extendedWallet, and that can just be a panic.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@buck54321
buck54321 merged commit ccdbc7d into decred:master Apr 1, 2025
martonp pushed a commit to martonp/dcrdex that referenced this pull request May 7, 2025
martonp pushed a commit to martonp/dcrdex that referenced this pull request Jul 8, 2025
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.

dcr: spv will panic on retry in spv loop.

3 participants