* Started work on multiple msgs, types and x/auth tests pass * Fix issues in x, examples, and baseapp * Added baseapp tests for multiple msgs * Documentation fixes * Fix baseapp tests with sdk.Int * Modify test * Transaction handling is now atomic * Fix test comment * Minor doc fixes and code cleanup * Added baseapp result changes * Use address in validator update accumulation * Started work on multiple msgs, types and x/auth tests pass * Fix issues in x, examples, and baseapp * Added baseapp tests for multiple msgs * Documentation fixes * Fix baseapp tests with sdk.Int * Modify test * Transaction handling is now atomic * Fix test comment * Minor doc fixes and code cleanup * Added baseapp result changes * Use address in validator update accumulation * Added ante tests for multisigner * Remove validatorUpdates from tx result * Better error logs * Put Memo in StdSignBytes and formatting * Updated changelog
33 lines
620 B
Go
33 lines
620 B
Go
package auth
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
crypto "github.com/tendermint/go-crypto"
|
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
)
|
|
|
|
// func newStdFee() StdFee {
|
|
// return NewStdFee(100,
|
|
// Coin{"atom", 150},
|
|
// )
|
|
// }
|
|
|
|
func TestStdTx(t *testing.T) {
|
|
priv := crypto.GenPrivKeyEd25519()
|
|
addr := priv.PubKey().Address()
|
|
msgs := []sdk.Msg{sdk.NewTestMsg(addr)}
|
|
fee := newStdFee()
|
|
sigs := []StdSignature{}
|
|
|
|
tx := NewStdTx(msgs, fee, sigs, "")
|
|
assert.Equal(t, msgs, tx.GetMsgs())
|
|
assert.Equal(t, sigs, tx.GetSignatures())
|
|
|
|
feePayer := FeePayer(tx)
|
|
assert.Equal(t, addr, feePayer)
|
|
}
|