Skip to content

Commit

Permalink
Add getstakeinfo online help.
Browse files Browse the repository at this point in the history
Most of the help was already here, but was not being used because the
method was missing from the rpchelp.Methods slice.  Also had to add a
help description for the ownmempooltix result field so this would
generate without errors, as it was missing.

Fixes btcsuite#69.
  • Loading branch information
jrick committed Feb 29, 2016
1 parent 578fee5 commit 3fa0130
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions internal/rpchelp/helpdescs_en_US.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ var helpDescsEnUS = map[string]string{
"getstakeinforesult-poolsize": "Number of live tickets in the ticket pool.",
"getstakeinforesult-difficulty": "Current stake difficulty.",
"getstakeinforesult-allmempooltix": "Number of tickets currently in the mempool",
"getstakeinforesult-ownmempooltix": "Number of tickets submitted by this wallet currently in mempool",
"getstakeinforesult-immature": "Number of tickets from this wallet that are in the blockchain but which are not yet mature",
"getstakeinforesult-live": "Number of mature, active tickets owned by this wallet",
"getstakeinforesult-proportionlive": "(Live / PoolSize)",
Expand Down
1 change: 1 addition & 0 deletions internal/rpchelp/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ var Methods = []struct {
{"sendtossrtx", returnsString},
{"sendtosstx", returnsString},
{"sendtossgen", returnsString},
{"getstakeinfo", []interface{}{(*dcrjson.GetStakeInfoResult)(nil)}},
}

var HelpDescs = []struct {
Expand Down
3 changes: 2 additions & 1 deletion rpc/legacyrpc/rpcserverhelp.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,12 @@ func helpDescsEnUS() map[string]string {
"sendtossrtx": "sendtossrtx \"fromaccount\" \"tickethash\" (\"comment\")\n\nSend to SS Revocation transaction\n\nArguments:\n1. fromaccount (string, required) The account to spend a stake ticket from (default=\"default\")\n2. tickethash (string, required) Hash of the ticket to be revoked\n3. comment (string, optional) Unused\n\nResult:\n\"value\" (string) txid of the resulting transaction\n",
"sendtosstx": "sendtosstx \"fromaccount\" amounts [{\"txid\":\"value\",\"vout\":n,\"tree\":n,\"amt\":n},...] [{\"addr\":\"value\",\"commitamt\":n,\"changeaddr\":\"value\",\"changeamt\":n},...] (minconf=1 \"comment\")\n\nSend to SStx\n\nArguments:\n1. fromaccount (string, required) The account sent from\n2. amounts (object, required) Amounts to send\n{\n \"Key\": Value, (object) Unused\n ...\n}\n3. inputs (array of object, required) Inputs for the tx\n[{\n \"txid\": \"value\", (string) Txid to use\n \"vout\": n, (numeric) Vout for the input tx\n \"tree\": n, (numeric) Input tree\n \"amt\": n, (numeric) Amount\n},...]\n4. couts (array of object, required) Couts for the tx\n[{\n \"addr\": \"value\", (string) Address to use\n \"commitamt\": n, (numeric) Amount to commit\n \"changeaddr\": \"value\", (string) Change address to use\n \"changeamt\": n, (numeric) Change amount\n},...]\n5. minconf (numeric, optional, default=1) Minimum number of block confirmations required\n6. comment (string, optional) Unused\n\nResult:\n\"value\" (string) txid of the resulting transaction\n",
"sendtossgen": "sendtossgen \"fromaccount\" \"tickethash\" \"blockhash\" height votebits (\"comment\")\n\nGenerate a vote tx\n\nArguments:\n1. fromaccount (string, required) The account to use (default=\"default\")\n2. tickethash (string, required) Hash of the ticket used for vote\n3. blockhash (string, required) Hash for the block being voted on\n4. height (numeric, required) Blockheight for vote\n5. votebits (numeric, required) Votebits to set\n6. comment (string, optional) Unused\n\nResult:\n\"value\" (string) txid of the resulting transaction\n",
"getstakeinfo": "getstakeinfo\n\nReturns statistics about staking from the wallet.\n\nArguments:\nNone\n\nResult:\n{\n \"poolsize\": n, (numeric) Number of live tickets in the ticket pool.\n \"difficulty\": n.nnn, (numeric) Current stake difficulty.\n \"allmempooltix\": n, (numeric) Number of tickets currently in the mempool\n \"ownmempooltix\": n, (numeric) Number of tickets submitted by this wallet currently in mempool\n \"immature\": n, (numeric) Number of tickets from this wallet that are in the blockchain but which are not yet mature\n \"live\": n, (numeric) Number of mature, active tickets owned by this wallet\n \"proportionlive\": n.nnn, (numeric) (Live / PoolSize)\n \"voted\": n, (numeric) Number of votes cast by this wallet\n \"totalsubsidy\": n.nnn, (numeric) Total amount of coins earned by stake mining\n \"missed\": n, (numeric) Number of missed tickets (failing to vote or expired)\n \"proportionmissed\": n.nnn, (numeric) (Missed / (Missed + Voted))\n \"revoked\": n, (numeric) Number of missed tickets that were missed and then revoked\n} \n",
}
}

var localeHelpDescs = map[string]func() map[string]string{
"en_US": helpDescsEnUS,
}

var requestUsages = "addmultisigaddress nrequired [\"key\",...] (\"account\")\ncreatemultisig nrequired [\"key\",...]\ndumpprivkey \"address\"\ngetaccount \"address\"\ngetaccountaddress \"account\"\ngetaddressesbyaccount \"account\"\ngetbalance (\"account\" minconf=1 \"balancetype\")\ngetbestblockhash\ngetblockcount\ngetinfo\ngetmasterpubkey\ngetmultisigoutinfo \"hash\" index\ngetseed\ngetnewaddress (\"account\" verbose=false)\ngetrawchangeaddress (\"account\" verbose=false)\ngetreceivedbyaccount \"account\" (minconf=1)\ngetreceivedbyaddress \"address\" (minconf=1)\ngettickets includeimmature\ngetticketmaxprice\ngettransaction \"txid\" (includewatchonly=false)\nhelp (\"command\")\nimportprivkey \"privkey\" (\"label\" rescan=true)\nimportscript \"hex\"\nkeypoolrefill (newsize=100)\nlistaccounts (minconf=1)\nlistlockunspent\nlistreceivedbyaccount (minconf=1 includeempty=false includewatchonly=false)\nlistreceivedbyaddress (minconf=1 includeempty=false includewatchonly=false)\nlistsinceblock (\"blockhash\" targetconfirmations=1 includewatchonly=false)\nlisttransactions (\"account\" count=10 from=0 includewatchonly=false)\nlistunspent (minconf=1 maxconf=9999999 [\"address\",...])\nlockunspent unlock [{\"txid\":\"value\",\"vout\":n,\"tree\":n},...]\nredeemmultisigout \"hash\" index tree (\"address\")\nredeemmultisigouts \"fromscraddress\" (\"toaddress\" number)\nsendfrom \"fromaccount\" \"toaddress\" amount (minconf=1 \"comment\" \"commentto\")\nsendmany \"fromaccount\" {\"address\":amount,...} (minconf=1 \"comment\")\nsendtoaddress \"address\" amount (\"comment\" \"commentto\")\nsendtomultisig \"fromaccount\" amount [\"pubkey\",...] (nrequired=1 minconf=1 \"comment\")\nsetticketmaxprice max\nsettxfee amount\nsignmessage \"address\" \"message\"\nsignrawtransaction \"rawtx\" ([{\"txid\":\"value\",\"vout\":n,\"tree\":n,\"scriptpubkey\":\"value\",\"redeemscript\":\"value\"},...] [\"privkey\",...] flags=\"ALL\")\nsignrawtransactions [\"rawtx\",...] (send=true)\nvalidateaddress \"address\"\nverifymessage \"address\" \"signature\" \"message\"\nwalletlock\nwalletpassphrase \"passphrase\" timeout\nwalletpassphrasechange \"oldpassphrase\" \"newpassphrase\"\ncreatenewaccount \"account\"\nexportwatchingwallet (\"account\" download=false)\ngetbestblock\ngetunconfirmedbalance (\"account\")\nlistaddresstransactions [\"address\",...] (\"account\")\nlistalltransactions (\"account\")\nrenameaccount \"oldaccount\" \"newaccount\"\nwalletislocked\npurchaseticket \"fromaccount\" spendlimit (minconf=1 \"ticketaddress\" \"comment\")\nsendtossrtx \"fromaccount\" \"tickethash\" (\"comment\")\nsendtosstx \"fromaccount\" amounts [{\"txid\":\"value\",\"vout\":n,\"tree\":n,\"amt\":n},...] [{\"addr\":\"value\",\"commitamt\":n,\"changeaddr\":\"value\",\"changeamt\":n},...] (minconf=1 \"comment\")\nsendtossgen \"fromaccount\" \"tickethash\" \"blockhash\" height votebits (\"comment\")"
var requestUsages = "addmultisigaddress nrequired [\"key\",...] (\"account\")\ncreatemultisig nrequired [\"key\",...]\ndumpprivkey \"address\"\ngetaccount \"address\"\ngetaccountaddress \"account\"\ngetaddressesbyaccount \"account\"\ngetbalance (\"account\" minconf=1 \"balancetype\")\ngetbestblockhash\ngetblockcount\ngetinfo\ngetmasterpubkey\ngetmultisigoutinfo \"hash\" index\ngetseed\ngetnewaddress (\"account\" verbose=false)\ngetrawchangeaddress (\"account\" verbose=false)\ngetreceivedbyaccount \"account\" (minconf=1)\ngetreceivedbyaddress \"address\" (minconf=1)\ngettickets includeimmature\ngetticketmaxprice\ngettransaction \"txid\" (includewatchonly=false)\nhelp (\"command\")\nimportprivkey \"privkey\" (\"label\" rescan=true)\nimportscript \"hex\"\nkeypoolrefill (newsize=100)\nlistaccounts (minconf=1)\nlistlockunspent\nlistreceivedbyaccount (minconf=1 includeempty=false includewatchonly=false)\nlistreceivedbyaddress (minconf=1 includeempty=false includewatchonly=false)\nlistsinceblock (\"blockhash\" targetconfirmations=1 includewatchonly=false)\nlisttransactions (\"account\" count=10 from=0 includewatchonly=false)\nlistunspent (minconf=1 maxconf=9999999 [\"address\",...])\nlockunspent unlock [{\"txid\":\"value\",\"vout\":n,\"tree\":n},...]\nredeemmultisigout \"hash\" index tree (\"address\")\nredeemmultisigouts \"fromscraddress\" (\"toaddress\" number)\nsendfrom \"fromaccount\" \"toaddress\" amount (minconf=1 \"comment\" \"commentto\")\nsendmany \"fromaccount\" {\"address\":amount,...} (minconf=1 \"comment\")\nsendtoaddress \"address\" amount (\"comment\" \"commentto\")\nsendtomultisig \"fromaccount\" amount [\"pubkey\",...] (nrequired=1 minconf=1 \"comment\")\nsetticketmaxprice max\nsettxfee amount\nsignmessage \"address\" \"message\"\nsignrawtransaction \"rawtx\" ([{\"txid\":\"value\",\"vout\":n,\"tree\":n,\"scriptpubkey\":\"value\",\"redeemscript\":\"value\"},...] [\"privkey\",...] flags=\"ALL\")\nsignrawtransactions [\"rawtx\",...] (send=true)\nvalidateaddress \"address\"\nverifymessage \"address\" \"signature\" \"message\"\nwalletlock\nwalletpassphrase \"passphrase\" timeout\nwalletpassphrasechange \"oldpassphrase\" \"newpassphrase\"\ncreatenewaccount \"account\"\nexportwatchingwallet (\"account\" download=false)\ngetbestblock\ngetunconfirmedbalance (\"account\")\nlistaddresstransactions [\"address\",...] (\"account\")\nlistalltransactions (\"account\")\nrenameaccount \"oldaccount\" \"newaccount\"\nwalletislocked\npurchaseticket \"fromaccount\" spendlimit (minconf=1 \"ticketaddress\" \"comment\")\nsendtossrtx \"fromaccount\" \"tickethash\" (\"comment\")\nsendtosstx \"fromaccount\" amounts [{\"txid\":\"value\",\"vout\":n,\"tree\":n,\"amt\":n},...] [{\"addr\":\"value\",\"commitamt\":n,\"changeaddr\":\"value\",\"changeamt\":n},...] (minconf=1 \"comment\")\nsendtossgen \"fromaccount\" \"tickethash\" \"blockhash\" height votebits (\"comment\")\ngetstakeinfo"

0 comments on commit 3fa0130

Please sign in to comment.