Browse Source

RPC: Add "Difficulty Accepted" to "coin" command

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

+ 2 - 1
README.RPC

@@ -453,7 +453,8 @@ API V3.3
 
 Modified API command:
  '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; add 'Difficulty Accepted'
  'pools' - add 'Mining Goal'
 
 ---------

+ 2 - 0
api.c

@@ -3106,6 +3106,8 @@ static void minecoin(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __may
 		root = api_add_bool(root, "LP", &goal->have_longpoll, false);
 		root = api_add_diff(root, "Network Difficulty", &goal->current_diff, true);
 		
+		root = api_add_diff(root, "Difficulty Accepted", &goal->diff_accepted, false);
+		
 		root = print_data(root, buf, isjson, precom);
 		io_add(io_data, buf);
 		if (isjson)