Skip to content

Commit

Permalink
Add new RPC handlers for get/setticketfee
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlyp committed Feb 29, 2016
1 parent 61dd0bc commit c1420d9
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions dcrjson/dcrwalletextcmds.go
Expand Up @@ -116,6 +116,17 @@ func NewGetStakeInfoCmd() *GetStakeInfoCmd {
return &GetStakeInfoCmd{}
}

// GetTicketFeeCmd is a type handling custom marshaling and
// unmarshaling of getticketfee JSON wallet extension
// commands.
type GetTicketFeeCmd struct {
}

// NewGetTicketFeeCmd creates a new GetTicketFeeCmd.
func NewGetTicketFeeCmd() *GetTicketFeeCmd {
return &GetTicketFeeCmd{}
}

// GetTicketMaxPriceCmd is a type handling custom marshaling and
// unmarshaling of getticketmaxprice JSON wallet extension
// commands.
Expand Down Expand Up @@ -380,6 +391,20 @@ func NewSendToSSRtxCmd(fromaccount string, tickethash string,
}
}

// SetTicketFeeCmd is a type handling custom marshaling and
// unmarshaling of setticketfee JSON RPC commands.
type SetTicketFeeCmd struct {
Fee float64
}

// NewSetTicketFeeCmd creates a new instance of the setticketfee
// command.
func NewSetTicketFeeCmd(fee float64) *SetTicketFeeCmd {
return &SetTicketFeeCmd{
Fee: fee,
}
}

// SetTicketMaxPriceCmd is a type handling custom marshaling and
// unmarshaling of setticketmaxprice JSON RPC commands.
type SetTicketMaxPriceCmd struct {
Expand Down Expand Up @@ -440,6 +465,7 @@ func init() {
MustRegisterCmd("getmasterpubkey", (*GetMasterPubkeyCmd)(nil), flags)
MustRegisterCmd("getseed", (*GetSeedCmd)(nil), flags)
MustRegisterCmd("getstakeinfo", (*GetStakeInfoCmd)(nil), flags)
MustRegisterCmd("getticketfee", (*GetTicketFeeCmd)(nil), flags)
MustRegisterCmd("getticketmaxprice", (*GetTicketMaxPriceCmd)(nil), flags)
MustRegisterCmd("gettickets", (*GetTicketsCmd)(nil), flags)
MustRegisterCmd("getticketvotebits", (*GetTicketVoteBitsCmd)(nil), flags)
Expand All @@ -459,6 +485,7 @@ func init() {
MustRegisterCmd("sendtosstx", (*SendToSStxCmd)(nil), flags)
MustRegisterCmd("sendtossgen", (*SendToSSGenCmd)(nil), flags)
MustRegisterCmd("sendtossrtx", (*SendToSSRtxCmd)(nil), flags)
MustRegisterCmd("setticketfee", (*SetTicketFeeCmd)(nil), flags)
MustRegisterCmd("setticketmaxprice", (*SetTicketMaxPriceCmd)(nil), flags)
MustRegisterCmd("setticketvotebits", (*SetTicketVoteBitsCmd)(nil), flags)
MustRegisterCmd("signrawtransactions", (*SignRawTransactionsCmd)(nil), flags)
Expand Down

0 comments on commit c1420d9

Please sign in to comment.