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
+1 -2
View File
@@ -10,7 +10,6 @@ import (
tmrand "github.com/tendermint/tendermint/libs/rand"
"github.com/tendermint/tendermint/p2p"
"github.com/tendermint/tendermint/privval"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
"github.com/tendermint/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
)
@@ -79,7 +78,7 @@ func initFilesWithConfig(config *cfg.Config) error {
ConsensusParams: types.DefaultConsensusParams(),
}
if keyType == "secp256k1" {
genDoc.ConsensusParams.Validator = tmproto.ValidatorParams{
genDoc.ConsensusParams.Validator = types.ValidatorParams{
PubKeyTypes: []string{types.ABCIPubKeyTypeSecp256k1},
}
}
+1 -2
View File
@@ -15,7 +15,6 @@ import (
tmrand "github.com/tendermint/tendermint/libs/rand"
"github.com/tendermint/tendermint/p2p"
"github.com/tendermint/tendermint/privval"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
"github.com/tendermint/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
)
@@ -189,7 +188,7 @@ func testnetFiles(cmd *cobra.Command, args []string) error {
ConsensusParams: types.DefaultConsensusParams(),
}
if keyType == "secp256k1" {
genDoc.ConsensusParams.Validator = tmproto.ValidatorParams{
genDoc.ConsensusParams.Validator = types.ValidatorParams{
PubKeyTypes: []string{types.ABCIPubKeyTypeSecp256k1},
}
}