mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-04 20:23:59 +00:00
Add package jsontypes that implements a subset of the custom libs/json package. Specifically it handles encoding and decoding of interface types wrapped in "tagged" JSON objects. It omits the deep reflection on arbitrary types, preserving only the handling of type tags wrapper encoding. - Register interface types (Evidence, PubKey, PrivKey) for tagged encoding. - Update the existing implementations to satisfy the type. - Register those types with the jsontypes registry. - Add string tags to 64-bit integer fields where needed. - Add marshalers to structs that export interface-typed fields.
41 lines
938 B
Go
41 lines
938 B
Go
package version
|
|
|
|
import tmversion "github.com/tendermint/tendermint/proto/tendermint/version"
|
|
|
|
var (
|
|
TMVersion = TMVersionDefault
|
|
)
|
|
|
|
const (
|
|
|
|
// TMVersionDefault is the used as the fallback version of Tendermint Core
|
|
// when not using git describe. It is formatted with semantic versioning.
|
|
TMVersionDefault = "0.35.0-unreleased"
|
|
// ABCISemVer is the semantic version of the ABCI library
|
|
ABCISemVer = "0.17.0"
|
|
|
|
ABCIVersion = ABCISemVer
|
|
)
|
|
|
|
var (
|
|
// P2PProtocol versions all p2p behavior and msgs.
|
|
// This includes proposer selection.
|
|
P2PProtocol uint64 = 8
|
|
|
|
// BlockProtocol versions all block data structures and processing.
|
|
// This includes validity of blocks and state updates.
|
|
BlockProtocol uint64 = 11
|
|
)
|
|
|
|
type Consensus struct {
|
|
Block uint64 `json:"block,string"`
|
|
App uint64 `json:"app,string"`
|
|
}
|
|
|
|
func (c Consensus) ToProto() tmversion.Consensus {
|
|
return tmversion.Consensus{
|
|
Block: c.Block,
|
|
App: c.App,
|
|
}
|
|
}
|