func (ss *FridayFilePVSignState) CheckHRS(height int64, round int, step int8) (bool, *SignState, error) {
	if ss.ImmutableHeight >= height {
		return false, nil, fmt.Errorf("height regression. Got %v, immutable height %v", height, ss.ImmutableHeight)
	}

	if signStateInterface, exist := ss.HeightSignStateMap.Load(height); exist {
		signState := signStateInterface.(SignState)
		if signState.Round > round {
			return false, nil, fmt.Errorf("round regression at height %v. Got %v, last round %v", height, round, signState.Round)
		}

		if signState.Round == round {
			if signState.Step > step {
				return false, nil, fmt.Errorf("step regression at height %v round %v. Got %v, last step %v", height, round, step, signState.Step)
			} else if signState.Step == step {
				if signState.SignBytes != nil {
					if signState.Signature == nil {
						panic("pv: Signature is nil but SignBytes is not!")
					}
					return true, &signState, nil
				}
				return false, nil, errors.New("no SignBytes found")
			}
		}
	}

	return false, nil, nil
}
// CheckHRS checks the given height, round, step (HRS) against that of the
// FilePVLastSignState. It returns an error if the arguments constitute a regression,
// or if they match but the SignBytes are empty.
// The returned boolean indicates whether the last Signature should be reused -
// it returns true if the HRS matches the arguments and the SignBytes are not empty (indicating
// we have already signed for this HRS, and can reuse the existing signature).
// It panics if the HRS matches the arguments, there's a SignBytes, but no Signature.
CheckHRS checks the given height, round, step (HRS) against that of the
FilePVLastSignState. It returns an error if the arguments constitute a regression,
or if they match but the SignBytes are empty.
The returned boolean indicates whether the last Signature should be reused
it returns true if the HRS matches the arguments and the SignBytes are not empty (indicating
we have already signed for this HRS, and can reuse the existing signature).
It panics if the HRS matches the arguments, there's a SignBytes, but no Signature.
// CheckHRS checks the given height round step ( HRS ) against that of the // FilePVLastSignState . It returns an error if the arguments constitute a regression // or if they match but the SignBytes are empty . // The returned boolean indicates whether the last Signature should be reused - // it returns true if the HRS matches the arguments and the SignBytes are not empty ( indicating // we have already signed for this HRS and can reuse the existing signature ) . // It panics if the HRS matches the arguments there ' s a SignBytes but no Signature .
func (ss *FridayFilePVSignState) CheckHRS(height int64, round int, step int8) (bool, *SignState, error) {
	if ss.ImmutableHeight >= height {
		return false, nil, fmt.Errorf("height regression. Got %v, immutable height %v", height, ss.ImmutableHeight)
	}
	if signStateInterface, exist := ss.HeightSignStateMap.Load(height); exist {
		signState := signStateInterface.(SignState)
		if signState.Round > round {
			return false, nil, fmt.Errorf("round regression at height %v. Got %v, last round %v", height, round, signState.Round)
		}
		if signState.Round == round {
			if signState.Step > step {
				return false, nil, fmt.Errorf("step regression at height %v round %v. Got %v, last step %v", height, round, step, signState.Step)
			} else if signState.Step == step {
				if signState.SignBytes != nil {
					if signState.Signature == nil {
						panic("pv: Signature is nil but SignBytes is not!")
					}
					return true, &signState, nil
				}
				return false, nil, errors.New("no SignBytes found")
			}
		}
	}
	return false, nil, nil
}
func ( ss * FridayFilePVSignState ) CheckHRS ( height int64 , round int , step int8 ) ( bool , * SignState , error ) { if ss . ImmutableHeight >= height { return false , nil , fmt . Errorf ( " " , height , ss . ImmutableHeight ) } if signStateInterface , exist := ss . HeightSignStateMap . Load ( height ) ; exist { signState := signStateInterface . ( SignState ) if signState . Round > round { return false , nil , fmt . Errorf ( " " , height , round , signState . Round ) } if signState . Round == round { if signState . Step > step { return false , nil , fmt . Errorf ( " " , height , round , step , signState . Step ) } else if signState . Step == step { if signState . SignBytes != nil { if signState . Signature == nil { panic ( " " ) } return true , & signState , nil } return false , nil , errors . New ( " " ) } } } return false , nil , nil }
CheckHRS checks the given height, round, step (HRS) against that of the
FilePVLastSignState.
CheckHRS checks the given height round step ( HRS ) against that of the FilePVLastSignState .