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:
Marko
2021-01-27 20:14:27 +00:00
committed by GitHub
parent 4dca066aab
commit 70bb8cc8b7
36 changed files with 301 additions and 157 deletions
+14
View File
@@ -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,
}
}