Update to latest go-crypto, adjust code and tests

This commit is contained in:
Ethan Frey
2017-04-27 15:53:49 +02:00
parent 787cf0ebac
commit b6ebf9f8b8
11 changed files with 39 additions and 49 deletions
+1 -3
View File
@@ -9,7 +9,6 @@ import (
abci "github.com/tendermint/abci/types"
"github.com/tendermint/basecoin/app"
"github.com/tendermint/basecoin/types"
crypto "github.com/tendermint/go-crypto"
"github.com/tendermint/go-wire"
eyescli "github.com/tendermint/merkleeyes/client"
)
@@ -52,8 +51,7 @@ func TestCounterPlugin(t *testing.T) {
// Sign request
signBytes := tx.SignBytes(chainID)
// t.Logf("Sign bytes: %X\n", signBytes)
sig := test1PrivAcc.Sign(signBytes)
tx.Input.Signature = crypto.WrapSignature(sig)
tx.Input.Signature = test1PrivAcc.Sign(signBytes)
// t.Logf("Signed TX bytes: %X\n", wire.BinaryBytes(struct{ types.Tx }{tx}))
// Write request
+1 -1
View File
@@ -270,7 +270,7 @@ func TestIBCPluginBadCommit(t *testing.T) {
// Modify the first byte of the first signature
sig := commit.Precommits[0].Signature.Unwrap().(crypto.SignatureEd25519)
sig[0] += 1
commit.Precommits[0].Signature = crypto.WrapSignature(sig)
commit.Precommits[0].Signature = sig.Wrap()
res = ibcPlugin.RunTx(store, ctx, wire.BinaryBytes(struct{ IBCTx }{IBCUpdateChainTx{
Header: header,
Commit: commit,