Update to tendermint v0.22.6-rc0 (#1798)

* Update to tendermint v0.22.6-rc0

This is comprised of updating the crypto imports / API

* (squash this) switch to v0.22.6

If this passes tests, I'll squash this commit and update the PR.
This commit is contained in:
Dev Ojha
2018-07-25 16:43:37 -04:00
committed by Ethan Buchman
parent d6cd0d4acc
commit 5d02a743fb
40 changed files with 167 additions and 133 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"
@@ -95,9 +96,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[:]
}