|
24 | 24 | #include <util.h>
|
25 | 25 | #include <utilstrencodings.h>
|
26 | 26 | #include <hash.h>
|
| 27 | +#include <validationinterface.h> |
27 | 28 | #include <warnings.h>
|
28 | 29 |
|
29 | 30 | #include <stdint.h>
|
@@ -323,6 +324,21 @@ UniValue waitforblockheight(const JSONRPCRequest& request)
|
323 | 324 | return ret;
|
324 | 325 | }
|
325 | 326 |
|
| 327 | +UniValue syncwithvalidationinterfacequeue(const JSONRPCRequest& request) |
| 328 | +{ |
| 329 | + if (request.fHelp || request.params.size() > 0) { |
| 330 | + throw std::runtime_error( |
| 331 | + "syncwithvalidationinterfacequeue\n" |
| 332 | + "\nWaits for the validation interface queue to catch up on everything that was there when we entered this function.\n" |
| 333 | + "\nExamples:\n" |
| 334 | + + HelpExampleCli("syncwithvalidationinterfacequeue","") |
| 335 | + + HelpExampleRpc("syncwithvalidationinterfacequeue","") |
| 336 | + ); |
| 337 | + } |
| 338 | + SyncWithValidationInterfaceQueue(); |
| 339 | + return NullUniValue; |
| 340 | +} |
| 341 | + |
326 | 342 | UniValue getdifficulty(const JSONRPCRequest& request)
|
327 | 343 | {
|
328 | 344 | if (request.fHelp || request.params.size() != 0)
|
@@ -1628,6 +1644,7 @@ static const CRPCCommand commands[] =
|
1628 | 1644 | { "hidden", "waitfornewblock", &waitfornewblock, {"timeout"} },
|
1629 | 1645 | { "hidden", "waitforblock", &waitforblock, {"blockhash","timeout"} },
|
1630 | 1646 | { "hidden", "waitforblockheight", &waitforblockheight, {"height","timeout"} },
|
| 1647 | + { "hidden", "syncwithvalidationinterfacequeue", &syncwithvalidationinterfacequeue, {} }, |
1631 | 1648 | };
|
1632 | 1649 |
|
1633 | 1650 | void RegisterBlockchainRPCCommands(CRPCTable &t)
|
|
0 commit comments