diff options
author | Akio Nakamura <nakamura@dgtechnologies.co.jp> | 2017-08-10 16:53:59 +0900 |
---|---|---|
committer | Akio Nakamura <nakamura@dgtechnologies.co.jp> | 2017-08-25 18:32:45 +0900 |
commit | 33366768afe21ff85259c0712176604aab56d9ae (patch) | |
tree | eefbc66cbe5a273a07d654512d6cfe92b4b5c9b5 /test/functional/zapwallettxes.py | |
parent | 2c9f5ecf3fd4d6eacaea730df48681e11adbea16 (diff) |
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.
Diffstat (limited to 'test/functional/zapwallettxes.py')
0 files changed, 0 insertions, 0 deletions