mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-20 15:04:22 +00:00
light: return light client status on rpc /status (#7536)
*light: rpc /status returns status of light client ; code refactoring light: moved lightClientInfo into light.go, renamed String to ID test/e2e: Return light client trusted height instead of SyncInfo trusted height test/e2e/start.go: Not waiting for light client to catch up in tests. Removed querying of syncInfo in start if the node is a light node * light: Removed call to primary /status. Added trustedPeriod to light info * light/provider: added ID function to return IP of primary and witnesses * light/provider/http/http_test: renamed String() to ID()
This commit is contained in:
@@ -118,8 +118,17 @@ func Start(ctx context.Context, testnet *e2e.Testnet) error {
|
||||
wcancel()
|
||||
|
||||
node.HasStarted = true
|
||||
|
||||
var lastNodeHeight int64
|
||||
|
||||
// If the node is a light client, we fetch its current height
|
||||
if node.Mode == e2e.ModeLight {
|
||||
lastNodeHeight = status.LightClientInfo.LastTrustedHeight
|
||||
} else {
|
||||
lastNodeHeight = status.SyncInfo.LatestBlockHeight
|
||||
}
|
||||
logger.Info(fmt.Sprintf("Node %v up on http://127.0.0.1:%v at height %v",
|
||||
node.Name, node.ProxyPort, status.SyncInfo.LatestBlockHeight))
|
||||
node.Name, node.ProxyPort, lastNodeHeight))
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user