Documentation ¶
Index ¶
- func RewardTxGoToCapn(seg *capn.Segment, src *RewardTx) capnp.RewardTxCapn
- type RewardTx
- func (scr *RewardTx) GetData() string
- func (scr *RewardTx) GetRecvAddress() []byte
- func (scr *RewardTx) GetSndAddress() []byte
- func (scr *RewardTx) GetValue() *big.Int
- func (scr *RewardTx) IsInterfaceNil() bool
- func (scr *RewardTx) Load(r io.Reader) error
- func (scr *RewardTx) Save(w io.Writer) error
- func (scr *RewardTx) SetData(data string)
- func (scr *RewardTx) SetRecvAddress(addr []byte)
- func (scr *RewardTx) SetSndAddress(addr []byte)
- func (scr *RewardTx) SetValue(value *big.Int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RewardTxGoToCapn ¶ added in v1.0.20
func RewardTxGoToCapn(seg *capn.Segment, src *RewardTx) capnp.RewardTxCapn
RewardTxGoToCapn is a helper function to copy fields from a RewardTx object to a RewardTxCapn object
Types ¶
type RewardTx ¶
type RewardTx struct { Round uint64 `capid:"1" json:"round"` Epoch uint32 `capid:"2" json:"epoch"` Value *big.Int `capid:"3" json:"value"` RcvAddr []byte `capid:"4" json:"receiver"` ShardId uint32 `capid:"5" json:"shardId"` }
RewardTx holds the data for a reward transaction
func RewardTxCapnToGo ¶ added in v1.0.20
func RewardTxCapnToGo(src capnp.RewardTxCapn, dest *RewardTx) *RewardTx
RewardTxCapnToGo is a helper function to copy fields from a RewardTxCapn object to a RewardTx object
func (*RewardTx) GetRecvAddress ¶ added in v1.0.20
GetRecvAddress returns the receiver address from the reward transaction
func (*RewardTx) GetSndAddress ¶ added in v1.0.20
GetSndAddress returns the sender address from the reward transaction
func (*RewardTx) IsInterfaceNil ¶
IsInterfaceNil verifies if underlying object is nil
func (*RewardTx) Load ¶ added in v1.0.20
Load loads the data from the stream into a RewardTx object through Capnp protocol
func (*RewardTx) Save ¶ added in v1.0.20
Save saves the serialized data of a RewardTx into a stream through Capnp protocol
func (*RewardTx) SetRecvAddress ¶ added in v1.0.20
SetRecvAddress sets the receiver address of the reward transaction
func (*RewardTx) SetSndAddress ¶ added in v1.0.20
SetSndAddress sets the sender address of the reward transaction