mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-06 13:26:23 +00:00
types: migrate params to protobuf (#4962)
This commit is contained in:
@@ -163,7 +163,7 @@ func (c *Client) ConsensusParams(height *int64) (*ctypes.ResultConsensusParams,
|
||||
}
|
||||
|
||||
// Validate res.
|
||||
if err := res.ConsensusParams.Validate(); err != nil {
|
||||
if err := types.ValidateConsensusParams(res.ConsensusParams); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res.BlockHeight <= 0 {
|
||||
@@ -177,7 +177,7 @@ func (c *Client) ConsensusParams(height *int64) (*ctypes.ResultConsensusParams,
|
||||
}
|
||||
|
||||
// Verify hash.
|
||||
if cH, tH := res.ConsensusParams.Hash(), h.ConsensusHash; !bytes.Equal(cH, tH) {
|
||||
if cH, tH := types.HashConsensusParams(res.ConsensusParams), h.ConsensusHash; !bytes.Equal(cH, tH) {
|
||||
return nil, fmt.Errorf("params hash %X does not match trusted hash %X",
|
||||
cH, tH)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user