aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-01-16 20:16:22 -0500
committerMarcoFalke <falke.marco@gmail.com>2018-01-17 16:44:32 -0500
commitfa1e69e52bf8de08b1ce7a774416aa7a8d20068b (patch)
tree1ea4464d1cf8ebb220977146936ab743f16e4445 /src
parent66e3af709dd444b2d85e15c56f4608c700ff82ee (diff)
qa: Sync with validationinterface queue in sync_mempools
Diffstat (limited to 'src')
-rw-r--r--src/rpc/blockchain.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index 1b2c71c4a4..346672e45a 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -24,6 +24,7 @@
#include <util.h>
#include <utilstrencodings.h>
#include <hash.h>
+#include <validationinterface.h>
#include <warnings.h>
#include <stdint.h>
@@ -323,6 +324,21 @@ UniValue waitforblockheight(const JSONRPCRequest& request)
return ret;
}
+UniValue syncwithvalidationinterfacequeue(const JSONRPCRequest& request)
+{
+ if (request.fHelp || request.params.size() > 0) {
+ throw std::runtime_error(
+ "syncwithvalidationinterfacequeue\n"
+ "\nWaits for the validation interface queue to catch up on everything that was there when we entered this function.\n"
+ "\nExamples:\n"
+ + HelpExampleCli("syncwithvalidationinterfacequeue","")
+ + HelpExampleRpc("syncwithvalidationinterfacequeue","")
+ );
+ }
+ SyncWithValidationInterfaceQueue();
+ return NullUniValue;
+}
+
UniValue getdifficulty(const JSONRPCRequest& request)
{
if (request.fHelp || request.params.size() != 0)
@@ -1628,6 +1644,7 @@ static const CRPCCommand commands[] =
{ "hidden", "waitfornewblock", &waitfornewblock, {"timeout"} },
{ "hidden", "waitforblock", &waitforblock, {"blockhash","timeout"} },
{ "hidden", "waitforblockheight", &waitforblockheight, {"height","timeout"} },
+ { "hidden", "syncwithvalidationinterfacequeue", &syncwithvalidationinterfacequeue, {} },
};
void RegisterBlockchainRPCCommands(CRPCTable &t)