Page MenuHomePhabricator

rpc: Clarify that block count means height excl genesis
ClosedPublic

Authored by PiRK on Oct 8 2020, 15:20.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rABCc835e67dda5f: 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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Owners added a reviewer: Restricted Owners Package.Oct 8 2020, 15:20
PiRK requested review of this revision.Oct 8 2020, 15:20

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

deadalnix edited the test plan for this revision. (Show Details)
This revision is now accepted and ready to land.Oct 8 2020, 15:43