Skip to content

fix race condition in hostdb

David Vorick requested to merge host-race into master

The hostdb previously would spin up some goroutines to do scanning before it would finish fetching all of the updates from the consensus set. Because the hostdb does not grab a lock during the call to New, this resulted in a race condition. The startup order is now correct, and the goroutines are not spun up until the hostdb has received all of the consensus changes.

The hostdb should probably not have been scanning hosts before getting all of the blocks anyway.

Merge request reports