Page MenuHomePhabricator

[rpc] getblockchaininfo: add size_on_disk, prune_target_size, automatic_pruning
ClosedPublic

Authored by nakihito on Mar 23 2019, 02:05.

Details

Reviewers
jasonbcox
deadalnix
Fabien
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Summary

Fix pruneheight help text.
Move fPruneMode block to match output ordering with help text.
Add functional tests for new fields in getblockchaininfo.

Backport of PR11367
https://github.com/bitcoin/bitcoin/pull/11367/

Depends on D2730
Depends on D2778

Completes T462

Test Plan

make check
test_runner.py
bitcoin-cli help getblockchaininfo should have display information about "size_on_disk", "automatic_pruning", and "prune_target_size"
bitcoin-cli getblockchaininfo should display "size_on_disk" and, if the prune option is enabled, "prune_height", "automatic_pruning", and "prune_target_size".

Diff Detail

Repository
rABC Bitcoin ABC
Branch
BackportPR11367
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 5291
Build 8644: Bitcoin ABC Buildbot (legacy)
Build 8643: arc lint + arc unit

Event Timeline

Owners added a reviewer: Restricted Owners Package.Mar 23 2019, 02:05
deadalnix requested changes to this revision.Mar 23 2019, 14:44
deadalnix added inline comments.
src/validation.cpp
4070 ↗(On Diff #7807)

Revert

src/validation.h
426 ↗(On Diff #7807)

dot at the end of sentence.

This revision now requires changes to proceed.Mar 23 2019, 14:44
jasonbcox requested changes to this revision.Mar 25 2019, 17:29
jasonbcox added inline comments.
src/validation.h
426 ↗(On Diff #7807)

This line also needs correct comment linting similar to the revert you pointed out.

nakihito marked 3 inline comments as done.

Fixed comment formatting and punctuation.

Fabien requested changes to this revision.Mar 26 2019, 10:16
Fabien added inline comments.
src/rpc/blockchain.cpp
1239

There is something wrong with this layout.
The D2730 version doesn't match the one in this diff, you should check the layout and rebase.

src/validation.cpp
4092

Remove

This revision now requires changes to proceed.Mar 26 2019, 10:16

Rebased, fixed indentation, and removed excess new line.

Fabien requested changes to this revision.Mar 28 2019, 08:33
Fabien added inline comments.
src/rpc/blockchain.cpp
1239 ↗(On Diff #7838)

This is still not the same layout than D2730, on which this diff is based on.
You may have missed to squash some commits before rebasing.

This revision now requires changes to proceed.Mar 28 2019, 08:33
nakihito marked 2 inline comments as done.

Rebased off master.

Fabien requested changes to this revision.Apr 2 2019, 15:16

This deserves an entry in the release notes

test/functional/rpc_blockchain.py
110 ↗(On Diff #7890)

You can rebase on top of D2758 to avoid this

This revision now requires changes to proceed.Apr 2 2019, 15:16
doc/release-notes.md
6 ↗(On Diff #7912)

Please mention the RPC on which these changes occur

Added RPC command to line added to release-notes.md.

This revision is now accepted and ready to land.Apr 4 2019, 16:17

Rebased off version bump. Now depends on D2778.