Add missing lock to IsValidPruningPoint. (#1296)

This commit is contained in:
stasatdaglabs 2020-12-28 10:08:36 +02:00 committed by GitHub
parent cfe013eca7
commit b0251fe1a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -311,6 +311,9 @@ func (s *consensus) GetSyncInfo() (*externalapi.SyncInfo, error) {
}
func (s *consensus) IsValidPruningPoint(blockHash *externalapi.DomainHash) (bool, error) {
s.lock.Lock()
defer s.lock.Unlock()
err := s.validateBlockHashExists(blockHash)
if err != nil {
return false, err