HomePhabricator

add waitfornewblock/waitforblock/waitforblockheight rpcs and use them for tests

Description

add waitfornewblock/waitforblock/waitforblockheight rpcs and use them for tests

waitfornewblock waits until a new block is received, or the timeout expires, then
returns the current block height/hash.

waitforblock waits for a specific blockhash, or until the timeout expires, then
returns the current block height/hash. If the target blockhash is the current
tip, it will return immediately.

waitforblockheight waits until the tip has reached a certain height or higher,
then returns the current height and hash.

waitforblockheight is used to avoid polling in the rpc tests.

Details

Provenance
Cory Fields <cory-nospam-@coryfields.com>Authored on Sep 2 2016, 01:55
deadalnixPushed on May 14 2017, 22:04
Parents
rABC5b2ea29cf4fd: Merge #8594: Do not add random inbound peers to addrman.
Branches
Unknown
Tags
Unknown

Event Timeline

Cory Fields <cory-nospam-@coryfields.com> committed rABCd6a5dc4a2eaa: add waitfornewblock/waitforblock/waitforblockheight rpcs and use them for tests (authored by Cory Fields <cory-nospam-@coryfields.com>).Sep 7 2016, 16:46