diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2016-09-01 21:55:21 -0400 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2016-09-07 12:46:01 -0400 |
commit | d6a5dc4a2eaa0d7348804254ca09e75fc3a858ab (patch) | |
tree | dd60ab61035edb6e519f9f69b4d80d48de079ff2 /src/rpc/client.cpp | |
parent | 5b2ea29cf4fd298346437bb16a54407f8c1f9dca (diff) |
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.
Diffstat (limited to 'src/rpc/client.cpp')
-rw-r--r-- | src/rpc/client.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rpc/client.cpp b/src/rpc/client.cpp index 3003ea3452..c14d9d6747 100644 --- a/src/rpc/client.cpp +++ b/src/rpc/client.cpp @@ -46,6 +46,12 @@ static const CRPCConvertParam vRPCConvertParams[] = { "getbalance", 1 }, { "getbalance", 2 }, { "getblockhash", 0 }, + { "waitforblockheight", 0 }, + { "waitforblockheight", 1 }, + { "waitforblock", 1 }, + { "waitforblock", 2 }, + { "waitfornewblock", 0 }, + { "waitfornewblock", 1 }, { "move", 2 }, { "move", 3 }, { "sendfrom", 2 }, |