Update to patched go-p2p, tendermint, fix a few tests
This commit is contained in:
parent
0665a2e8a6
commit
787cf0ebac
|
@ -38,7 +38,7 @@ func TestLoadGenesis(t *testing.T) {
|
||||||
assert.EqualValues("blank", acct.Balance[0].Denom)
|
assert.EqualValues("blank", acct.Balance[0].Denom)
|
||||||
|
|
||||||
// and public key is parsed properly
|
// and public key is parsed properly
|
||||||
apk := acct.PubKey.PubKey
|
apk := acct.PubKey.Unwrap()
|
||||||
require.NotNil(apk)
|
require.NotNil(apk)
|
||||||
epk, ok := apk.(crypto.PubKeyEd25519)
|
epk, ok := apk.(crypto.PubKeyEd25519)
|
||||||
if assert.True(ok) {
|
if assert.True(ok) {
|
||||||
|
|
|
@ -75,13 +75,14 @@ func (k *Key) Sign(msg []byte) crypto.Signature {
|
||||||
// Generates a new validator with private key.
|
// Generates a new validator with private key.
|
||||||
func genKey() *Key {
|
func genKey() *Key {
|
||||||
privKey := crypto.GenPrivKeyEd25519()
|
privKey := crypto.GenPrivKeyEd25519()
|
||||||
addrBytes := privKey.PubKey().Address()
|
pubKey := privKey.PubKey()
|
||||||
|
addrBytes := pubKey.Address()
|
||||||
var addr Address
|
var addr Address
|
||||||
copy(addr[:], addrBytes)
|
copy(addr[:], addrBytes)
|
||||||
return &Key{
|
return &Key{
|
||||||
Address: addr,
|
Address: addr,
|
||||||
PubKey: crypto.PubKeyS{privKey.PubKey()},
|
PubKey: pubKey,
|
||||||
PrivKey: crypto.PrivKeyS{privKey},
|
PrivKey: privKey.Wrap(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ imports:
|
||||||
- name: github.com/tendermint/go-merkle
|
- name: github.com/tendermint/go-merkle
|
||||||
version: 714d4d04557fd068a7c2a1748241ce8428015a96
|
version: 714d4d04557fd068a7c2a1748241ce8428015a96
|
||||||
- name: github.com/tendermint/go-p2p
|
- name: github.com/tendermint/go-p2p
|
||||||
version: 17124989a93774833df33107fbf17157a7f8ef31
|
version: a163fddbdd2541793d22402afb113e6ccb391774
|
||||||
subpackages:
|
subpackages:
|
||||||
- upnp
|
- upnp
|
||||||
- name: github.com/tendermint/go-rpc
|
- name: github.com/tendermint/go-rpc
|
||||||
|
@ -107,7 +107,7 @@ imports:
|
||||||
- app
|
- app
|
||||||
- client
|
- client
|
||||||
- name: github.com/tendermint/tendermint
|
- name: github.com/tendermint/tendermint
|
||||||
version: 6bcd4242f1f336e2b2ef4f644fabaf56222b34d0
|
version: 936e66867aecf92595b1f8615361b2867d9a69e6
|
||||||
subpackages:
|
subpackages:
|
||||||
- blockchain
|
- blockchain
|
||||||
- cmd/tendermint/commands
|
- cmd/tendermint/commands
|
||||||
|
|
|
@ -30,7 +30,7 @@ func genGenesisDoc(chainID string, numVals int) (*tm.GenesisDoc, []types.PrivAcc
|
||||||
name := cmn.Fmt("%v_val_%v", chainID, i)
|
name := cmn.Fmt("%v_val_%v", chainID, i)
|
||||||
privAcc := types.PrivAccountFromSecret(name)
|
privAcc := types.PrivAccountFromSecret(name)
|
||||||
genDoc.Validators = append(genDoc.Validators, tm.GenesisValidator{
|
genDoc.Validators = append(genDoc.Validators, tm.GenesisValidator{
|
||||||
PubKey: privAcc.PubKey.PubKey,
|
PubKey: privAcc.PubKey,
|
||||||
Amount: 1,
|
Amount: 1,
|
||||||
Name: name,
|
Name: name,
|
||||||
})
|
})
|
||||||
|
@ -268,9 +268,9 @@ func TestIBCPluginBadCommit(t *testing.T) {
|
||||||
|
|
||||||
// Update a chain with a broken commit
|
// Update a chain with a broken commit
|
||||||
// Modify the first byte of the first signature
|
// Modify the first byte of the first signature
|
||||||
sig := commit.Precommits[0].Signature.(crypto.SignatureEd25519)
|
sig := commit.Precommits[0].Signature.Unwrap().(crypto.SignatureEd25519)
|
||||||
sig[0] += 1
|
sig[0] += 1
|
||||||
commit.Precommits[0].Signature = sig
|
commit.Precommits[0].Signature = crypto.WrapSignature(sig)
|
||||||
res = ibcPlugin.RunTx(store, ctx, wire.BinaryBytes(struct{ IBCTx }{IBCUpdateChainTx{
|
res = ibcPlugin.RunTx(store, ctx, wire.BinaryBytes(struct{ IBCTx }{IBCUpdateChainTx{
|
||||||
Header: header,
|
Header: header,
|
||||||
Commit: commit,
|
Commit: commit,
|
||||||
|
|
Loading…
Reference in New Issue