Skip to content

Commit

Permalink
Add GetWalletFeeCmd to dcrjson cmd/results
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlyp committed Feb 11, 2016
1 parent 4d5ee10 commit 3968690
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dcrjson/dcrwalletextcmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,16 @@ type GetTicketsCmd struct {
IncludeImmature bool
}

// GetWalletFeeCmd defines the getwalletfee JSON-RPC command.
type GetWalletFeeCmd struct{}

// NewGetWalletFeeCmd returns a new instance which can be used to issue a
// getwalletfee JSON-RPC command.
//
func NewGetWalletFeeCmd() *GetWalletFeeCmd {
return &GetWalletFeeCmd{}
}

// NewGetTicketsCmd creates a new GetTicketsCmd.
func NewGetTicketsCmd(includeImmature bool) *GetTicketsCmd {
return &GetTicketsCmd{includeImmature}
Expand Down
5 changes: 5 additions & 0 deletions dcrjson/dcrwalletextresults.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ type GetTicketsResult struct {
Hashes []string `json:"hashes"`
}

// GetWalletFee models the data returned from the getwalletfee command
type GetWalletFeeResult struct {
Fee float64 `json:"fee"`
}

// RedeemMultiSigOutResult models the data returned from the redeemmultisigout
// command.
type RedeemMultiSigOutResult struct {
Expand Down
1 change: 1 addition & 0 deletions dcrjson/walletsvrcmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,7 @@ func init() {
MustRegisterCmd("getreceivedbyaccount", (*GetReceivedByAccountCmd)(nil), flags)
MustRegisterCmd("getreceivedbyaddress", (*GetReceivedByAddressCmd)(nil), flags)
MustRegisterCmd("gettransaction", (*GetTransactionCmd)(nil), flags)
MustRegisterCmd("getwalletfee", (*GetWalletFeeCmd)(nil), flags)
MustRegisterCmd("importprivkey", (*ImportPrivKeyCmd)(nil), flags)
MustRegisterCmd("keypoolrefill", (*KeyPoolRefillCmd)(nil), flags)
MustRegisterCmd("listaccounts", (*ListAccountsCmd)(nil), flags)
Expand Down

0 comments on commit 3968690

Please sign in to comment.