0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-09 10:43:19 -05:00
bitcoin-bitcoin-core/src/rpc
Akio Nakamura 33366768af Fix getchaintxstats()
1. Calculate nblocks more adaptive.
   If not specify nblocks-parameter, illegal parameter error
   will happen when target block height is below blocks for 1 month.
   To avoid this error, set default nblocks to
   min(blocks for 1 month, target block's height - 1)
   And allowing 0 so that this RPC works good even if target block is
   genesis block or 1st block.
2. Correct error message.
   nblocks accepts [0 .. block's height -1] . so fix as following:
   "Invalid block count: should be between 0 and the block's height - 1"
3. Add check 0-divide.
   If nTimeDiff = 0 then returns {... "txrate":} and
   bitcoin-cli cannot handle the response.
   To avoid this error, do not return "txrate" if nTimeDiff = 0.
4. Add following 3 elements to the return object.
   1) 'window_block_count' : Size of the window in number of blocks.
   2) 'window_tx_count' : The number of transactions in the window.
   3) 'window_interval' : The elapsed time in the window.
   They clarify how 'txrate' is calculated. 2) and 3) are returned
   only if 'window_block_count' is a positive value.
5. Improve help text for 'time' as following.
   'The timestamp for the final block in the window in UNIX format.
2017-08-25 18:32:45 +09:00
..
blockchain.cpp Fix getchaintxstats() 2017-08-25 18:32:45 +09:00
blockchain.h Remove unnecessary forward class declarations in header files 2017-06-12 20:37:43 +02:00
client.cpp listsinceblock: optionally find and list any transactions that were undone due to reorg when requesting a non-main chain block in a new 'removed' array. 2017-07-21 09:50:59 +09:00
client.h rpc: Named argument support for bitcoin-cli 2017-01-10 12:04:54 +01:00
mining.cpp Merge #11050: Avoid treating null RPC arguments different from missing arguments 2017-08-22 09:26:38 +02:00
mining.h Properly bound check conf_target in wallet RPC calls 2017-07-14 23:41:40 -04:00
misc.cpp Merge #11050: Avoid treating null RPC arguments different from missing arguments 2017-08-22 09:26:38 +02:00
net.cpp Avoid treating null RPC arguments different from missing arguments 2017-08-14 19:44:02 -04:00
protocol.cpp scripted-diff: stop using the gArgs wrappers 2017-08-14 17:02:10 +02:00
protocol.h Fix misleading "Method not found" multiwallet errors 2017-07-26 02:48:15 -04:00
rawtransaction.cpp Merge #11050: Avoid treating null RPC arguments different from missing arguments 2017-08-22 09:26:38 +02:00
register.h Do not shadow global RPC table variable (tableRPC) 2016-08-25 15:02:26 +02:00
server.cpp scripted-diff: stop using the gArgs wrappers 2017-08-14 17:02:10 +02:00
server.h Declare single-argument (non-converting) constructors "explicit" 2017-08-16 16:33:25 +02:00