HomePhabricator

rpc: Clarify that block count means height excl genesis

Description

rpc: Clarify that block count means height excl genesis

Summary:
Description of PR:

There is a common misconception that the block count returned by the blockchain rpcs includes the genesis block.
However, it really returns the height, which is 0 for the genesis block.
So clarify that and also remove the misleading "longest blockchain" comment.
Finally, fix the wallet test that incorrectly used this rpc.

Backport of Core PR16325

Test Plan:

ninja && ninja check-all
src/bitcoin-cli help getbestblockhash
src/bitcoin-cli help getbockcount

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D7822

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Jul 2 2019, 16:42
PiRKCommitted on Oct 8 2020, 16:06
PiRKPushed on Oct 8 2020, 16:06
Reviewer
Restricted Owners Package
Differential Revision
D7822: rpc: Clarify that block count means height excl genesis
Parents
rABCa3081fc09220: gui: Set progressDialog to nullptr
Branches
Unknown
Tags
Unknown