Merge remote-tracking branch 'origin/develop' into jlandrews/gaiad-export

This commit is contained in:
rigelrozanski 2018-07-26 12:52:12 -04:00
commit 0fb57a735b
5 changed files with 48 additions and 45 deletions

View File

@ -5,7 +5,9 @@ import (
"encoding/json"
"fmt"
"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/ed25519"
cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino"
cmn "github.com/tendermint/tendermint/libs/common"
dbm "github.com/tendermint/tendermint/libs/db"
"github.com/tendermint/tendermint/libs/log"
@ -28,7 +30,7 @@ func NewCodec() *wire.Codec {
cdc.RegisterInterface((*sdk.Msg)(nil), nil)
cdc.RegisterConcrete(MsgSend{}, "example/MsgSend", nil)
cdc.RegisterConcrete(MsgIssue{}, "example/MsgIssue", nil)
crypto.RegisterAmino(cdc)
cryptoAmino.RegisterAmino(cdc)
return cdc
}

View File

@ -2,8 +2,9 @@ package app
import (
"testing"
"github.com/tendermint/tendermint/crypto"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/tendermint/tendermint/crypto/ed25519"
"github.com/stretchr/testify/require"
)
@ -11,8 +12,8 @@ import (
// Test encoding of app2Tx is correct with both msg types
func TestEncoding(t *testing.T) {
// Create privkeys and addresses
priv1 := crypto.GenPrivKeyEd25519()
priv2 := crypto.GenPrivKeyEd25519()
priv1 := ed25519.GenPrivKey()
priv2 := ed25519.GenPrivKey()
addr1 := priv1.PubKey().Address().Bytes()
addr2 := priv2.PubKey().Address().Bytes()

View File

@ -1,16 +1,16 @@
package app
import (
cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino"
cmn "github.com/tendermint/tendermint/libs/common"
dbm "github.com/tendermint/tendermint/libs/db"
"github.com/tendermint/tendermint/libs/log"
"github.com/tendermint/tendermint/crypto"
bapp "github.com/cosmos/cosmos-sdk/baseapp"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/wire"
"github.com/cosmos/cosmos-sdk/x/auth"
"github.com/cosmos/cosmos-sdk/x/bank"
"github.com/cosmos/cosmos-sdk/wire"
)
const (
@ -57,6 +57,6 @@ func UpdatedCodec() *wire.Codec {
cdc.RegisterConcrete(MsgSend{}, "example/MsgSend", nil)
cdc.RegisterConcrete(MsgIssue{}, "example/MsgIssue", nil)
auth.RegisterWire(cdc)
crypto.RegisterAmino(cdc)
cryptoAmino.RegisterAmino(cdc)
return cdc
}

View File

@ -1,14 +1,15 @@
package app
import (
"github.com/stretchr/testify/require"
"os"
"encoding/json"
"os"
"testing"
"github.com/stretchr/testify/require"
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/crypto/ed25519"
dbm "github.com/tendermint/tendermint/libs/db"
"github.com/tendermint/tendermint/libs/log"
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/crypto"
bapp "github.com/cosmos/cosmos-sdk/baseapp"
sdk "github.com/cosmos/cosmos-sdk/types"
@ -54,8 +55,8 @@ func TestBadMsg(t *testing.T) {
bc := newTestChain()
// Create privkeys and addresses
priv1 := crypto.GenPrivKeyEd25519()
priv2 := crypto.GenPrivKeyEd25519()
priv1 := ed25519.GenPrivKey()
priv2 := ed25519.GenPrivKey()
addr1 := priv1.PubKey().Address().Bytes()
addr2 := priv2.PubKey().Address().Bytes()
@ -99,8 +100,8 @@ func TestBadMsg(t *testing.T) {
func TestMsgSend(t *testing.T) {
bc := newTestChain()
priv1 := crypto.GenPrivKeyEd25519()
priv2 := crypto.GenPrivKeyEd25519()
priv1 := ed25519.GenPrivKey()
priv2 := ed25519.GenPrivKey()
addr1 := priv1.PubKey().Address().Bytes()
addr2 := priv2.PubKey().Address().Bytes()
@ -138,5 +139,4 @@ func TestMsgSend(t *testing.T) {
require.True(t, res.IsOK(), res.Log)
}

View File

@ -397,11 +397,11 @@ func TestTallyRevokedValidator(t *testing.T) {
stakeHandler := stake.NewHandler(sk)
dummyDescription := stake.NewDescription("T", "E", "S", "T")
val1CreateMsg := stake.NewMsgCreateValidator(addrs[0], crypto.GenPrivKeyEd25519().PubKey(), sdk.NewCoin("steak", 25), dummyDescription)
val1CreateMsg := stake.NewMsgCreateValidator(addrs[0], ed25519.GenPrivKey().PubKey(), sdk.NewCoin("steak", 25), dummyDescription)
stakeHandler(ctx, val1CreateMsg)
val2CreateMsg := stake.NewMsgCreateValidator(addrs[1], crypto.GenPrivKeyEd25519().PubKey(), sdk.NewCoin("steak", 6), dummyDescription)
val2CreateMsg := stake.NewMsgCreateValidator(addrs[1], ed25519.GenPrivKey().PubKey(), sdk.NewCoin("steak", 6), dummyDescription)
stakeHandler(ctx, val2CreateMsg)
val3CreateMsg := stake.NewMsgCreateValidator(addrs[2], crypto.GenPrivKeyEd25519().PubKey(), sdk.NewCoin("steak", 7), dummyDescription)
val3CreateMsg := stake.NewMsgCreateValidator(addrs[2], ed25519.GenPrivKey().PubKey(), sdk.NewCoin("steak", 7), dummyDescription)
stakeHandler(ctx, val3CreateMsg)
delegator1Msg := stake.NewMsgDelegate(addrs[3], addrs[2], sdk.NewCoin("steak", 10))