mirror of
https://github.com/FlipsideCrypto/dcrd.git
synced 2026-02-06 10:56:47 +00:00
mining: fix data race
Use the read template.
This commit is contained in:
parent
a05c85008d
commit
78fd2b33a4
@ -2504,10 +2504,10 @@ func (g *BgBlkTmplGenerator) curTplHasNumVotes(votedOnHash *chainhash.Hash, numV
|
||||
if template == nil || err != nil {
|
||||
return false
|
||||
}
|
||||
if g.template.Block.Header.PrevBlock != *votedOnHash {
|
||||
if template.Block.Header.PrevBlock != *votedOnHash {
|
||||
return false
|
||||
}
|
||||
return g.template.Block.Header.Voters == numVotes
|
||||
return template.Block.Header.Voters == numVotes
|
||||
}
|
||||
|
||||
// numVotesForBlock returns the number of votes on the provided block hash that
|
||||
|
||||
Loading…
Reference in New Issue
Block a user