Skip to content

Commit

Permalink
rpcserver: Update known wallet RPC methods.
Browse files Browse the repository at this point in the history
This updates the map of known wallet RPC methods to match the latest
reality so a more useful error message is returned to the user in the
case they attempt to issue wallet commands to the dcrd RPC server
instead of the wallet one.
  • Loading branch information
davecgh committed Oct 13, 2020
1 parent ac039fc commit 2b1dbb4
Showing 1 changed file with 78 additions and 67 deletions.
145 changes: 78 additions & 67 deletions internal/rpcserver/rpcserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,73 +223,84 @@ var rpcHandlersBeforeInit = map[types.Method]commandHandler{
// it lacks support for wallet functionality. For these commands the user
// should ask a connected instance of dcrwallet.
var rpcAskWallet = map[string]struct{}{
"abandontransaction": {},
"accountaddressindex": {},
"accountsyncaddressindex": {},
"addmultisigaddress": {},
"addticket": {},
"consolidate": {},
"createmultisig": {},
"createnewaccount": {},
"dumpprivkey": {},
"generatevote": {},
"getaccount": {},
"getaccountaddress": {},
"getaddressesbyaccount": {},
"getbalance": {},
"getmasterpubkey": {},
"getmultisigoutinfo": {},
"getnewaddress": {},
"getrawchangeaddress": {},
"getreceivedbyaccount": {},
"getreceivedbyaddress": {},
"getstakeinfo": {},
"getticketfee": {},
"gettickets": {},
"gettransaction": {},
"getvotechoices": {},
"getwalletfee": {},
"getunconfirmedbalance": {},
"importprivkey": {},
"importscript": {},
"listaccounts": {},
"listaddresstransactions": {},
"listalltransactions": {},
"listreceivedbyaccount": {},
"listreceivedbyaddress": {},
"listscripts": {},
"listsinceblock": {},
"listtransactions": {},
"listunspent": {},
"lockunspent": {},
"redeemmultisigout": {},
"redeemmultisigouts": {},
"renameaccount": {},
"rescanwallet": {},
"revoketickets": {},
"sendfrom": {},
"sendfromtreasury": {},
"sendmany": {},
"sendtoaddress": {},
"sendtomultisig": {},
"sendtotreasury": {},
"setticketfee": {},
"settxfee": {},
"setvotechoice": {},
"signmessage": {},
"signrawtransaction": {},
"signrawtransactions": {},
"stakepooluserinfo": {},
"sweepaccount": {},
"ticketsforaddress": {},
"validateaddress": {},
"verifymessage": {},
"verifyseed": {},
"walletinfo": {},
"walletislocked": {},
"walletlock": {},
"walletpassphrase": {},
"walletpassphrasechange": {},
"abandontransaction": {},
"accountaddressindex": {},
"accountsyncaddressindex": {},
"addmultisigaddress": {},
"addtransaction": {},
"addticket": {},
"auditreuse": {},
"consolidate": {},
"createmultisig": {},
"createnewaccount": {},
"createsignature": {},
"createvotingaccount": {},
"discoverusage": {},
"dumpprivkey": {},
"fundrawtransaction": {},
"generatevote": {},
"getaccount": {},
"getaccountaddress": {},
"getaddressesbyaccount": {},
"getbalance": {},
"getcoinjoinsbyacct": {},
"getmasterpubkey": {},
"getmultisigoutinfo": {},
"getnewaddress": {},
"getrawchangeaddress": {},
"getreceivedbyaccount": {},
"getreceivedbyaddress": {},
"getstakeinfo": {},
"gettickets": {},
"gettransaction": {},
"getunconfirmedbalance": {},
"getvotechoices": {},
"getwalletfee": {},
"importcfiltersv2": {},
"importprivkey": {},
"importscript": {},
"importxpub": {},
"listaccounts": {},
"listaddresstransactions": {},
"listalltransactions": {},
"listlockunspent": {},
"listreceivedbyaccount": {},
"listreceivedbyaddress": {},
"listsinceblock": {},
"listtransactions": {},
"listunspent": {},
"lockunspent": {},
"mixoutput": {},
"purchaseticket": {},
"redeemmultisigout": {},
"redeemmultisigouts": {},
"renameaccount": {},
"rescanwallet": {},
"revoketickets": {},
"sendfrom": {},
"sendfromtreasury": {},
"sendmany": {},
"sendtoaddress": {},
"sendtomultisig": {},
"sendtotreasury": {},
"setticketfee": {},
"settxfee": {},
"setvotechoice": {},
"signmessage": {},
"signrawtransaction": {},
"signrawtransactions": {},
"stakepooluserinfo": {},
"sweepaccount": {},
"ticketinfo": {},
"ticketsforaddress": {},
"validatepredcp0005cf": {},
"verifymessage": {},
"walletinfo": {},
"walletislocked": {},
"walletlock": {},
"walletpassphrase": {},
"walletpassphrasechange": {},
"walletpubpassphrasechange": {},
}

// Commands that are currently unimplemented, but should ultimately be.
Expand Down

0 comments on commit 2b1dbb4

Please sign in to comment.