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

dcr: Remove tx history wait. #3005

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JoeGruffins
Copy link
Member

closes #2971

handleTipChange must wait until the go functions are finished, so the tipMtx is held for writes for both of them. syncTxHistory calls SyncStatus which also conditionally holds the tipMtx for reads, randomly causing deadlock. I think running syncTxHistory as a goroutine and not waiting is the simplest answer.

SyncStatus has a chance to hold the tipMtx so run it in a goroutine and
do not wait.
@JoeGruffins
Copy link
Member Author

Example showing this behavior https://go.dev/play/p/F6KWiFSUfZb

@JoeGruffins
Copy link
Member Author

Possibly also fixes #3000, #2857, #2917

Copy link
Contributor

@martonp martonp left a comment

Choose a reason for hiding this comment

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

Nice.

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.

simnet/dcr: tip report channel was blocking
2 participants