mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 21:01:21 +00:00
tendermint/account -> acm
This commit is contained in:
@ -3,7 +3,7 @@ package types
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/tendermint/tendermint/account"
|
||||
acm "github.com/tendermint/tendermint/account"
|
||||
. "github.com/tendermint/tendermint/common"
|
||||
_ "github.com/tendermint/tendermint/config/tendermint_test"
|
||||
)
|
||||
@ -39,7 +39,7 @@ func TestSendTxSignable(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}
|
||||
signBytes := account.SignBytes(chainID, sendTx)
|
||||
signBytes := acm.SignBytes(chainID, sendTx)
|
||||
signStr := string(signBytes)
|
||||
expected := Fmt(`{"chain_id":"%s","tx":[1,{"inputs":[{"address":"696E70757431","amount":12345,"sequence":67890},{"address":"696E70757432","amount":111,"sequence":222}],"outputs":[{"address":"6F757470757431","amount":333},{"address":"6F757470757432","amount":444}]}]}`,
|
||||
config.GetString("chain_id"))
|
||||
@ -60,7 +60,7 @@ func TestCallTxSignable(t *testing.T) {
|
||||
Fee: 222,
|
||||
Data: []byte("data1"),
|
||||
}
|
||||
signBytes := account.SignBytes(chainID, callTx)
|
||||
signBytes := acm.SignBytes(chainID, callTx)
|
||||
signStr := string(signBytes)
|
||||
expected := Fmt(`{"chain_id":"%s","tx":[2,{"address":"636F6E747261637431","data":"6461746131","fee":222,"gas_limit":111,"input":{"address":"696E70757431","amount":12345,"sequence":67890}}]}`,
|
||||
config.GetString("chain_id"))
|
||||
@ -73,9 +73,9 @@ func TestBondTxSignable(t *testing.T) {
|
||||
privKeyBytes := make([]byte, 64)
|
||||
var privKeyArray [64]byte
|
||||
copy(privKeyArray[:], privKeyBytes)
|
||||
privAccount := account.GenPrivAccountFromPrivKeyBytes(&privKeyArray)
|
||||
privAccount := acm.GenPrivAccountFromPrivKeyBytes(&privKeyArray)
|
||||
bondTx := &BondTx{
|
||||
PubKey: privAccount.PubKey.(account.PubKeyEd25519),
|
||||
PubKey: privAccount.PubKey.(acm.PubKeyEd25519),
|
||||
Inputs: []*TxInput{
|
||||
&TxInput{
|
||||
Address: []byte("input1"),
|
||||
@ -99,7 +99,7 @@ func TestBondTxSignable(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}
|
||||
signBytes := account.SignBytes(chainID, bondTx)
|
||||
signBytes := acm.SignBytes(chainID, bondTx)
|
||||
signStr := string(signBytes)
|
||||
expected := Fmt(`{"chain_id":"%s","tx":[17,{"inputs":[{"address":"696E70757431","amount":12345,"sequence":67890},{"address":"696E70757432","amount":111,"sequence":222}],"pub_key":[1,"3B6A27BCCEB6A42D62A3A8D02A6F0D73653215771DE243A63AC048A18B59DA29"],"unbond_to":[{"address":"6F757470757431","amount":333},{"address":"6F757470757432","amount":444}]}]}`,
|
||||
config.GetString("chain_id"))
|
||||
@ -113,7 +113,7 @@ func TestUnbondTxSignable(t *testing.T) {
|
||||
Address: []byte("address1"),
|
||||
Height: 111,
|
||||
}
|
||||
signBytes := account.SignBytes(chainID, unbondTx)
|
||||
signBytes := acm.SignBytes(chainID, unbondTx)
|
||||
signStr := string(signBytes)
|
||||
expected := Fmt(`{"chain_id":"%s","tx":[18,{"address":"6164647265737331","height":111}]}`,
|
||||
config.GetString("chain_id"))
|
||||
@ -127,7 +127,7 @@ func TestRebondTxSignable(t *testing.T) {
|
||||
Address: []byte("address1"),
|
||||
Height: 111,
|
||||
}
|
||||
signBytes := account.SignBytes(chainID, rebondTx)
|
||||
signBytes := acm.SignBytes(chainID, rebondTx)
|
||||
signStr := string(signBytes)
|
||||
expected := Fmt(`{"chain_id":"%s","tx":[19,{"address":"6164647265737331","height":111}]}`,
|
||||
config.GetString("chain_id"))
|
||||
|
Reference in New Issue
Block a user