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

Bugfix for issue #101 draft 0.1 #115

Closed
wants to merge 2 commits into from
Closed

Bugfix for issue #101 draft 0.1 #115

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Mar 19, 2014

This is a bugfix for the race caused when a peer tried to write and read to p.versionKnown concurrently.

To correct this, a new mutex and two functions were added for locking and subsequently reading or writing the state of versionKnown.

@@ -147,6 +147,7 @@ type peer struct {
knownAddresses map[string]bool
knownInventory *MruInventoryMap
knownInvMutex sync.Mutex
versionMutex sync.Mutex
Copy link
Contributor

Choose a reason for hiding this comment

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

Please put this at least close to what it protects it makes reading the structure definition simpler (and we haven't gotten to the point of rearranging structures for better cache footprint)

@davecgh
Copy link
Member

davecgh commented Mar 24, 2014

@decred: Thanks for the pull request. This has been rebased, squashed, and merged as of commit a55ea10.

@davecgh davecgh closed this Mar 24, 2014
gsalgado pushed a commit to gsalgado/btcd that referenced this pull request Jul 29, 2014
If a websocket client was already connected and the wallet and/or
chain server is loaded into the rpc server (enabling the handlers
specific to those components), the btcdconnected notifications were
not being sent, and this could break clients that expected the
notification.  I'm not happy with this change, but since this is how
notifications are currently done (unsolicited), and to not break
compatibility yet, I'm adding these back in for now.

Eventually, this notification will require explicit registration
before it is received by a client.  See issue btcsuite#84.

Closes btcsuite#115.
kcalvinalvin added a commit to kcalvinalvin/btcd that referenced this pull request Nov 29, 2024
…logs

indexers: slience flatutreexoproofindex logs
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