Page MenuHomePhabricator

rpc: Return block time in getblockchaininfo
ClosedPublic

Authored by Fabien on Nov 21 2022, 12:26.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABCf7e15e8c8957: rpc: Return block time in getblockchaininfo
Summary
Return tip time in getblockchaininfo, for some use cases this can save a call to getblock.

Backport of core#22407.

Depends on D12550.

Test Plan
./test/functional/test_runner.py rpc_blockchain

Event Timeline

Fabien requested review of this revision.Nov 21 2022, 12:26
PiRK added a subscriber: PiRK.

Review note: GetBlockTime() and GetMedianTimePast() return an int64_t, so casting the value is unnecessary.

This revision is now accepted and ready to land.Nov 21 2022, 15:04