mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-14 13:51:21 +00:00
Add logs to lite/*; Fix rpc status to return consensus height, not blockstore height
This commit is contained in:
@ -3,8 +3,8 @@ package core
|
||||
import (
|
||||
"time"
|
||||
|
||||
crypto "github.com/tendermint/tendermint/crypto"
|
||||
"github.com/tendermint/tendermint/consensus"
|
||||
crypto "github.com/tendermint/tendermint/crypto"
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
"github.com/tendermint/tendermint/proxy"
|
||||
sm "github.com/tendermint/tendermint/state"
|
||||
@ -28,6 +28,7 @@ var subscribeTimeout = 5 * time.Second
|
||||
type Consensus interface {
|
||||
GetState() sm.State
|
||||
GetValidators() (int64, []*types.Validator)
|
||||
GetLastHeight() int64
|
||||
GetRoundStateJSON() ([]byte, error)
|
||||
GetRoundStateSimpleJSON() ([]byte, error)
|
||||
}
|
||||
|
@ -64,7 +64,12 @@ import (
|
||||
//}
|
||||
// ```
|
||||
func Status() (*ctypes.ResultStatus, error) {
|
||||
latestHeight := blockStore.Height()
|
||||
var latestHeight int64 = -1
|
||||
if consensusReactor.FastSync() {
|
||||
latestHeight = blockStore.Height()
|
||||
} else {
|
||||
latestHeight = consensusState.GetLastHeight()
|
||||
}
|
||||
var (
|
||||
latestBlockMeta *types.BlockMeta
|
||||
latestBlockHash cmn.HexBytes
|
||||
|
Reference in New Issue
Block a user