Browse Source

RPC: Add "Mining Goal" to "pools" command

Luke Dashjr 11 years ago
parent
commit
7396fe0a76
2 changed files with 2 additions and 0 deletions
  1. 1 0
      README.RPC
  2. 1 0
      api.c

+ 1 - 0
README.RPC

@@ -454,6 +454,7 @@ API V3.3
 Modified API command:
 Modified API command:
  'addpool' - accept an additional argument to indicate mining goal by name
  'addpool' - accept an additional argument to indicate mining goal by name
  'coin' - return multiple elements, when there are multiple mining goals defined
  'coin' - return multiple elements, when there are multiple mining goals defined
+ 'pools' - add 'Mining Goal'
 
 
 ---------
 ---------
 
 

+ 1 - 0
api.c

@@ -1934,6 +1934,7 @@ static void poolstatus(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __m
 		root = api_add_string(root, "Status", status, false);
 		root = api_add_string(root, "Status", status, false);
 		root = api_add_int(root, "Priority", &(pool->prio), false);
 		root = api_add_int(root, "Priority", &(pool->prio), false);
 		root = api_add_int(root, "Quota", &pool->quota, false);
 		root = api_add_int(root, "Quota", &pool->quota, false);
+		root = api_add_string(root, "Mining Goal", pool->goal->name, false);
 		root = api_add_string(root, "Long Poll", lp, false);
 		root = api_add_string(root, "Long Poll", lp, false);
 		root = api_add_uint(root, "Getworks", &(pool->getwork_requested), false);
 		root = api_add_uint(root, "Getworks", &(pool->getwork_requested), false);
 		root = api_add_int(root, "Accepted", &(pool->accepted), false);
 		root = api_add_int(root, "Accepted", &(pool->accepted), false);