mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-13 05:11:21 +00:00
Merge pull request #1300 from tendermint/lite-proxy-hardening-and-tests
lite/proxy: Validation* tests and hardening for nil dereferences
This commit is contained in:
@ -176,7 +176,9 @@ type Header struct {
|
||||
}
|
||||
|
||||
// Hash returns the hash of the header.
|
||||
// Returns nil if ValidatorHash is missing.
|
||||
// Returns nil if ValidatorHash is missing,
|
||||
// since a Header is not valid unless there is
|
||||
// a ValidaotrsHash (corresponding to the validator set).
|
||||
func (h *Header) Hash() cmn.HexBytes {
|
||||
if h == nil || len(h.ValidatorsHash) == 0 {
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user