diff options
| author | Wladimir J. van der Laan <[email protected]> | 2017-10-02 15:21:26 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2017-10-02 15:22:41 +0200 |
| commit | 90926db2381d87c68858659873230a3811ebdce5 (patch) | |
| tree | 41737ac11fc519327d7289d8a7e120025e8b12d4 /src/httpserver.cpp | |
| parent | Merge #11411: script: Change SignatureHash input index check to an assert. (diff) | |
| parent | Add some tests for getchaintxstats (diff) | |
| download | discoin-90926db2381d87c68858659873230a3811ebdce5.tar.xz discoin-90926db2381d87c68858659873230a3811ebdce5.zip | |
Merge #11021: [rpc] fix getchaintxstats()
07704c1 Add some tests for getchaintxstats (Akio Nakamura)
3336676 Fix getchaintxstats() (Akio Nakamura)
Pull request description:
1. calculate nblocks more adaptive.
-> set default nblocks to min (blocks for 1 month, target block's height - 1)
-> before PR: if not specify nblocks-parameter, illegal parameter error will happen when target block height is below nblocks.
2. correct error message.
-> nblocks accepts [1 .. block's height -1] . so add a word "-1".
3. add check 0-divide.
-> if nTimeDiff = 0 then use UniValue(UniValue::VNULL) and returns {... "txrate": null} .
-> before PR: if nTimeDiff = 0 then returns {... "txrate":} and bitcoin-cli cannot handle the response.
Tree-SHA512: e1962ce7bb05a5bc7dec03eb04a8e7578f50fdb68927fcfc0a2232905ef4d679293eee148ebe0866682d209a8c458d21fbe71715e7311adb81f37089aae1ed93
Diffstat (limited to 'src/httpserver.cpp')
0 files changed, 0 insertions, 0 deletions