Update to latest go-crypto, adjust code and tests
This commit is contained in:
@@ -7,8 +7,7 @@ import (
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/tendermint/basecoin/types"
|
||||
cmn "github.com/tendermint/go-common"
|
||||
crypto "github.com/tendermint/go-crypto"
|
||||
rpcclient "github.com/tendermint/go-rpc/client"
|
||||
"github.com/tendermint/go-rpc/client"
|
||||
"github.com/tendermint/go-rpc/types"
|
||||
wire "github.com/tendermint/go-wire"
|
||||
_ "github.com/tendermint/tendermint/rpc/core/types" // Register RPCResponse > Result types
|
||||
@@ -67,7 +66,7 @@ func main() {
|
||||
// Sign request
|
||||
signBytes := tx.SignBytes(chainID)
|
||||
sig := root.Sign(signBytes)
|
||||
tx.Inputs[0].Signature = crypto.WrapSignature(sig)
|
||||
tx.Inputs[0].Signature = sig
|
||||
//fmt.Println("tx:", tx)
|
||||
|
||||
// Write request
|
||||
@@ -118,7 +117,7 @@ func main() {
|
||||
// Sign request
|
||||
signBytes := tx.SignBytes(chainID)
|
||||
sig := privAccountA.Sign(signBytes)
|
||||
tx.Inputs[0].Signature = crypto.WrapSignature(sig)
|
||||
tx.Inputs[0].Signature = sig
|
||||
//fmt.Println("tx:", tx)
|
||||
|
||||
// Write request
|
||||
|
||||
@@ -9,7 +9,6 @@ import (
|
||||
"github.com/tendermint/basecoin/app"
|
||||
"github.com/tendermint/basecoin/types"
|
||||
cmn "github.com/tendermint/go-common"
|
||||
crypto "github.com/tendermint/go-crypto"
|
||||
"github.com/tendermint/go-wire"
|
||||
eyescli "github.com/tendermint/merkleeyes/client"
|
||||
)
|
||||
@@ -50,7 +49,7 @@ func TestSendTx(t *testing.T) {
|
||||
signBytes := tx.SignBytes(chainID)
|
||||
// t.Log("Sign bytes: %X\n", signBytes)
|
||||
sig := test1PrivAcc.Sign(signBytes)
|
||||
tx.Inputs[0].Signature = crypto.WrapSignature(sig)
|
||||
tx.Inputs[0].Signature = sig
|
||||
// t.Log("Signed TX bytes: %X\n", wire.BinaryBytes(types.TxS{tx}))
|
||||
|
||||
// Write request
|
||||
@@ -102,7 +101,7 @@ func TestSequence(t *testing.T) {
|
||||
// Sign request
|
||||
signBytes := tx.SignBytes(chainID)
|
||||
sig := test1PrivAcc.Sign(signBytes)
|
||||
tx.Inputs[0].Signature = crypto.WrapSignature(sig)
|
||||
tx.Inputs[0].Signature = sig
|
||||
// t.Log("ADDR: %X -> %X\n", tx.Inputs[0].Address, tx.Outputs[0].Address)
|
||||
|
||||
// Write request
|
||||
@@ -146,7 +145,7 @@ func TestSequence(t *testing.T) {
|
||||
// Sign request
|
||||
signBytes := tx.SignBytes(chainID)
|
||||
sig := privAccountA.Sign(signBytes)
|
||||
tx.Inputs[0].Signature = crypto.WrapSignature(sig)
|
||||
tx.Inputs[0].Signature = sig
|
||||
// t.Log("ADDR: %X -> %X\n", tx.Inputs[0].Address, tx.Outputs[0].Address)
|
||||
|
||||
// Write request
|
||||
|
||||
Reference in New Issue
Block a user