Update to tendermint v0.22.6 (#1798)

* Update to tendermint v0.22.6

- This was cherry-picked and fixed from develop
- Updates all crypto imports for changes from v0.22.5
This commit is contained in:
Dev Ojha
2018-07-25 17:13:30 -04:00
committed by Ethan Buchman
parent 029da74eff
commit bac91f7a7b
41 changed files with 176 additions and 147 deletions
+2 -2
View File
@@ -6,11 +6,11 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth"
"github.com/stretchr/testify/require"
"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/ed25519"
)
func TestToAccount(t *testing.T) {
priv := crypto.GenPrivKeyEd25519()
priv := ed25519.GenPrivKey()
addr := sdk.AccAddress(priv.PubKey().Address())
authAcc := auth.NewBaseAccountWithAddress(addr)
genAcc := NewGenesisAccount(&authAcc)
+4 -3
View File
@@ -12,7 +12,8 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/ed25519"
cmn "github.com/tendermint/tendermint/libs/common"
dbm "github.com/tendermint/tendermint/libs/db"
"github.com/tendermint/tendermint/libs/log"
@@ -94,9 +95,9 @@ func runHackCmd(cmd *cobra.Command, args []string) error {
}
}
func base64ToPub(b64 string) crypto.PubKeyEd25519 {
func base64ToPub(b64 string) ed25519.PubKeyEd25519 {
data, _ := base64.StdEncoding.DecodeString(b64)
var pubKey crypto.PubKeyEd25519
var pubKey ed25519.PubKeyEd25519
copy(pubKey[:], data)
return pubKey
+3 -2
View File
@@ -15,6 +15,7 @@ import (
"github.com/cosmos/cosmos-sdk/x/auth"
"github.com/spf13/cobra"
"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/ed25519"
)
func init() {
@@ -116,11 +117,11 @@ func runPubKeyCmd(cmd *cobra.Command, args []string) error {
}
}
var pubKey crypto.PubKeyEd25519
var pubKey ed25519.PubKeyEd25519
if pubKeyI == nil {
copy(pubKey[:], pubkeyBytes)
} else {
pubKey = pubKeyI.(crypto.PubKeyEd25519)
pubKey = pubKeyI.(ed25519.PubKeyEd25519)
pubkeyBytes = pubKey[:]
}