mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-21 07:24:36 +00:00
proto: seperate native and proto types (#5994)
## Description Separate protobuf and domain types. We should avoid using protobuf in our core logic. ref #5460
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package version
|
||||
|
||||
import tmversion "github.com/tendermint/tendermint/proto/tendermint/version"
|
||||
|
||||
var (
|
||||
// TMCoreSemVer is the current version of Tendermint Core.
|
||||
// It's the Semantic Version of the software.
|
||||
@@ -22,3 +24,15 @@ var (
|
||||
// This includes validity of blocks and state updates.
|
||||
BlockProtocol uint64 = 11
|
||||
)
|
||||
|
||||
type Consensus struct {
|
||||
Block uint64 `json:"block"`
|
||||
App uint64 `json:"app"`
|
||||
}
|
||||
|
||||
func (c Consensus) ToProto() tmversion.Consensus {
|
||||
return tmversion.Consensus{
|
||||
Block: c.Block,
|
||||
App: c.App,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user