add a safety check in ConcurrentProvider#UpdateToHeight

This commit is contained in:
Anton Kaliaev
2019-07-08 15:57:47 +04:00
parent 6810bab382
commit 06720dcd6b

View File

@@ -136,5 +136,8 @@ func (cp *ConcurrentProvider) UpdateToHeight(chainID string, height int64) error
}
// Is not the first call, so return the error from previous concurrent calls.
if callback != nil {
panic("expected callback to be nil")
}
return pr.err
}