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 -1
View File
@@ -345,7 +345,7 @@ func (h *Handshaker) ReplayBlocks(
}
if res.ConsensusParams != nil {
state.ConsensusParams = types.UpdateConsensusParams(state.ConsensusParams, res.ConsensusParams)
state.ConsensusParams = state.ConsensusParams.UpdateConsensusParams(res.ConsensusParams)
state.Version.Consensus.App = state.ConsensusParams.Version.AppVersion
}
// We update the last results hash with the empty hash, to conform with RFC-6962.
+1 -2
View File
@@ -17,7 +17,6 @@ import (
tmos "github.com/tendermint/tendermint/libs/os"
tmrand "github.com/tendermint/tendermint/libs/rand"
"github.com/tendermint/tendermint/p2p"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
cs "github.com/tendermint/tendermint/test/maverick/consensus"
nd "github.com/tendermint/tendermint/test/maverick/node"
"github.com/tendermint/tendermint/types"
@@ -212,7 +211,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},
}
}