auth.AccountStore assumes go-wire; Remove GetTxBytes() from Tx
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
package types
|
||||
|
||||
// A generic codec for a fixed type.
|
||||
type Codec interface {
|
||||
|
||||
// Returns a prototype (empty) object.
|
||||
Prototype() interface{}
|
||||
|
||||
// Encodes the object.
|
||||
Encode(o interface{}) ([]byte, error)
|
||||
|
||||
// Decodes an object.
|
||||
Decode(bz []byte) (interface{}, error)
|
||||
}
|
||||
+1
-13
@@ -2,7 +2,6 @@ package types
|
||||
|
||||
import (
|
||||
crypto "github.com/tendermint/go-crypto"
|
||||
wire "github.com/tendermint/go-wire"
|
||||
)
|
||||
|
||||
type Msg interface {
|
||||
@@ -34,10 +33,6 @@ type Tx interface {
|
||||
// deducted before the Msg is processed.
|
||||
GetFeePayer() crypto.Address
|
||||
|
||||
// Get the canonical byte representation of the Tx.
|
||||
// Includes any signatures (or empty slots).
|
||||
GetTxBytes() []byte
|
||||
|
||||
// Signatures returns the signature of signers who signed the Msg.
|
||||
// CONTRACT: Length returned is same as length of
|
||||
// pubkeys returned from MsgKeySigners, and the order
|
||||
@@ -55,14 +50,7 @@ type StdTx struct {
|
||||
Signatures []StdSignature
|
||||
}
|
||||
|
||||
func (tx StdTx) GetFeePayer() crypto.Address { return tx.Signatures[0].PubKey.Address() }
|
||||
func (tx StdTx) GetTxBytes() []byte {
|
||||
bz, err := wire.MarshalBinary(tx) // XXX: this is bad
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return bz
|
||||
}
|
||||
func (tx StdTx) GetFeePayer() crypto.Address { return tx.Signatures[0].PubKey.Address() }
|
||||
func (tx StdTx) GetSignatures() []StdSignature { return tx.Signatures }
|
||||
|
||||
type TxDecoder func(txBytes []byte) (Tx, error)
|
||||
|
||||
Reference in New Issue
Block a user