mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 12:51:22 +00:00
Refactor "lite" to handle delayed validator set changes.
Also, fix consensus liveness issue.
This commit is contained in:
@ -349,16 +349,16 @@ func BlockResults(heightPtr *int64) (*ctypes.ResultBlockResults, error) {
|
||||
return res, nil
|
||||
}
|
||||
|
||||
func getHeight(storeHeight int64, heightPtr *int64) (int64, error) {
|
||||
func getHeight(currentHeight int64, heightPtr *int64) (int64, error) {
|
||||
if heightPtr != nil {
|
||||
height := *heightPtr
|
||||
if height <= 0 {
|
||||
return 0, fmt.Errorf("Height must be greater than 0")
|
||||
}
|
||||
if height > storeHeight {
|
||||
if height > currentHeight {
|
||||
return 0, fmt.Errorf("Height must be less than or equal to the current blockchain height")
|
||||
}
|
||||
return height, nil
|
||||
}
|
||||
return storeHeight, nil
|
||||
return currentHeight, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user