basecoin compiles
This commit is contained in:
+16
-1
@@ -1,6 +1,9 @@
|
||||
package types
|
||||
|
||||
import crypto "github.com/tendermint/go-crypto"
|
||||
import (
|
||||
crypto "github.com/tendermint/go-crypto"
|
||||
wire "github.com/tendermint/go-wire"
|
||||
)
|
||||
|
||||
type Msg interface {
|
||||
|
||||
@@ -45,9 +48,21 @@ type Tx interface {
|
||||
GetSignatures() []StdSignature
|
||||
}
|
||||
|
||||
var _ Tx = (*StdTx)(nil)
|
||||
|
||||
type StdTx struct {
|
||||
Msg
|
||||
Signatures []StdSignature
|
||||
}
|
||||
|
||||
func (tx StdTx) GetFeePayer() crypto.Address { return tx.Signatures[0].PubKey.Address() }
|
||||
func (tx StdTx) GetTxBytes() []byte {
|
||||
bz, err := wire.MarshalBinary(tx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return bz
|
||||
}
|
||||
func (tx StdTx) GetSignatures() []StdSignature { return tx.Signatures }
|
||||
|
||||
type TxDecoder func(txBytes []byte) (Tx, error)
|
||||
|
||||
Reference in New Issue
Block a user