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
@@ -10,7 +10,7 @@ import (
"github.com/cosmos/cosmos-sdk/x/auth"
"github.com/stretchr/testify/require"
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/ed25519"
dbm "github.com/tendermint/tendermint/libs/db"
"github.com/tendermint/tendermint/libs/log"
)
@@ -42,7 +42,7 @@ func TestGenesis(t *testing.T) {
baseApp := NewBasecoinApp(logger, db)
// construct a pubkey and an address for the test account
pubkey := crypto.GenPrivKeyEd25519().PubKey()
pubkey := ed25519.GenPrivKey().PubKey()
addr := sdk.AccAddress(pubkey.Address())
// construct some test coins
+2 -2
View File
@@ -11,7 +11,7 @@ import (
"github.com/cosmos/cosmos-sdk/x/auth"
"github.com/stretchr/testify/require"
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/ed25519"
dbm "github.com/tendermint/tendermint/libs/db"
"github.com/tendermint/tendermint/libs/log"
)
@@ -46,7 +46,7 @@ func TestGenesis(t *testing.T) {
bapp := NewDemocoinApp(logger, db)
// Construct some genesis bytes to reflect democoin/types/AppAccount
pk := crypto.GenPrivKeyEd25519().PubKey()
pk := ed25519.GenPrivKey().PubKey()
addr := sdk.AccAddress(pk.Address())
coins, err := sdk.ParseCoins("77foocoin,99barcoin")
require.Nil(t, err)
+2 -2
View File
@@ -9,11 +9,11 @@ import (
"github.com/cosmos/cosmos-sdk/x/mock"
"github.com/stretchr/testify/require"
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/ed25519"
)
var (
priv1 = crypto.GenPrivKeyEd25519()
priv1 = ed25519.GenPrivKey()
pubKey = priv1.PubKey()
addr1 = sdk.AccAddress(pubKey.Address())
+2 -2
View File
@@ -11,11 +11,11 @@ import (
"github.com/cosmos/cosmos-sdk/x/mock"
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/ed25519"
)
var (
priv1 = crypto.GenPrivKeyEd25519()
priv1 = ed25519.GenPrivKey()
addr1 = sdk.AccAddress(priv1.PubKey().Address())
)
@@ -5,9 +5,9 @@ import (
"fmt"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/tendermint/tendermint/crypto/ed25519"
"github.com/tendermint/tendermint/crypto"
"github.com/spf13/viper"
"github.com/cosmos/cosmos-sdk/client/context"
sdk "github.com/cosmos/cosmos-sdk/types"
@@ -55,7 +55,7 @@ func BondTxCmd(cdc *wire.Codec) *cobra.Command {
if err != nil {
return err
}
var pubKeyEd crypto.PubKeyEd25519
var pubKeyEd ed25519.PubKeyEd25519
copy(pubKeyEd[:], rawPubKey)
msg := simplestake.NewMsgBond(from, stake, pubKeyEd)
@@ -8,7 +8,7 @@ import (
"github.com/stretchr/testify/require"
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/ed25519"
dbm "github.com/tendermint/tendermint/libs/db"
"github.com/tendermint/tendermint/libs/log"
@@ -43,7 +43,7 @@ func TestKeeperGetSet(t *testing.T) {
bi := stakeKeeper.getBondInfo(ctx, addr)
require.Equal(t, bi, bondInfo{})
privKey := crypto.GenPrivKeyEd25519()
privKey := ed25519.GenPrivKey()
bi = bondInfo{
PubKey: privKey.PubKey(),
@@ -69,7 +69,7 @@ func TestBonding(t *testing.T) {
coinKeeper := bank.NewKeeper(accountMapper)
stakeKeeper := NewKeeper(capKey, coinKeeper, DefaultCodespace)
addr := sdk.AccAddress([]byte("some-address"))
privKey := crypto.GenPrivKeyEd25519()
privKey := ed25519.GenPrivKey()
pubKey := privKey.PubKey()
_, _, err := stakeKeeper.unbondWithoutCoins(ctx, addr)
+2 -3
View File
@@ -4,14 +4,13 @@ import (
"testing"
"github.com/stretchr/testify/require"
"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/ed25519"
sdk "github.com/cosmos/cosmos-sdk/types"
)
func TestBondMsgValidation(t *testing.T) {
privKey := crypto.GenPrivKeyEd25519()
privKey := ed25519.GenPrivKey()
cases := []struct {
valid bool
msgBond MsgBond