Merge remote-tracking branch 'origin/master' into wb/pbts-rebase-master

This commit is contained in:
William Banfield
2022-01-20 18:18:24 -05:00
63 changed files with 811 additions and 1236 deletions
+16
View File
@@ -4,10 +4,26 @@ import (
"bytes"
"errors"
"fmt"
"time"
tbytes "github.com/tendermint/tendermint/libs/bytes"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
)
// Info about the status of the light client
type LightClientInfo struct {
PrimaryID string `json:"primaryID"`
WitnessesID []string `json:"witnessesID"`
NumPeers int `json:"number_of_peers,string"`
LastTrustedHeight int64 `json:"last_trusted_height,string"`
LastTrustedHash tbytes.HexBytes `json:"last_trusted_hash"`
LatestBlockTime time.Time `json:"latest_block_time"`
TrustingPeriod string `json:"trusting_period"`
// Boolean that reflects whether LatestBlockTime + trusting period is before
// time.Now() (time when /status is called)
TrustedBlockExpired bool `json:"trusted_block_expired"`
}
// LightBlock is a SignedHeader and a ValidatorSet.
// It is the basis of the light client
type LightBlock struct {