x/bank: remove Sequence from Input

This commit is contained in:
Ethan Buchman
2018-03-13 01:42:13 +01:00
parent 9b8db6b37c
commit b906c141bd
3 changed files with 29 additions and 43 deletions
+12 -1
View File
@@ -66,7 +66,18 @@ func (tx StdTx) GetMsg() Msg { return tx.Msg }
func (tx StdTx) GetFeePayer() Address { return tx.Signatures[0].PubKey.Address() } // XXX but PubKey is optional!
func (tx StdTx) GetSignatures() []StdSignature { return tx.Signatures }
//__________________________________________________________
// StdSignDoc is replay-prevention structure.
// It includes the result of msg.GetSignBytes(),
// as well as the ChainID (prevent cross chain replay)
// and the Sequence (prevent inchain replay).
type StdSignDoc struct {
ChainID string `json:"chain_id"`
Sequence int64 `json:"sequence"`
MsgBytes []byte `json:"msg_bytes"`
AltBytes []byte `json:"alt_bytes"` // TODO: do we really want this ?
}
//-------------------------------------
// Application function variable used to unmarshal transaction bytes
type TxDecoder func(txBytes []byte) (Tx, Error)