Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(pkg/da): ensure DAH.hash is always calculated during ValidateBasic (
#845) This is useful for headers downloaded from the network. Each such header goes through validation during which the hash should be calculated. Otherwise, the hash is calcualated at much later point, which is prone to races. In celestia-node we observed such races when the DAH.Hahs is read from multiple routines, where both end up calculating the hash and setting the it to the cache value making the race detector complain. Such precompute fixes this, similar to how Hash is precomputed in the constructor.
- Loading branch information