mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-23 15:20:49 +01:00
test: Use loop to register RPCs
The same loop is used by the server, so no need for the tests to do this differently.
This commit is contained in:
parent
b8593616dc
commit
fa2197c8b3
1 changed files with 4 additions and 2 deletions
|
@ -35,14 +35,16 @@ static RPCHelpMan rpcNestedTest_rpc()
|
||||||
}
|
}
|
||||||
|
|
||||||
static const CRPCCommand vRPCCommands[] = {
|
static const CRPCCommand vRPCCommands[] = {
|
||||||
{"test", &rpcNestedTest_rpc},
|
{"rpcNestedTest", &rpcNestedTest_rpc},
|
||||||
};
|
};
|
||||||
|
|
||||||
void RPCNestedTests::rpcNestedTests()
|
void RPCNestedTests::rpcNestedTests()
|
||||||
{
|
{
|
||||||
// do some test setup
|
// do some test setup
|
||||||
// could be moved to a more generic place when we add more tests on QT level
|
// could be moved to a more generic place when we add more tests on QT level
|
||||||
tableRPC.appendCommand("rpcNestedTest", &vRPCCommands[0]);
|
for (const auto& c : vRPCCommands) {
|
||||||
|
tableRPC.appendCommand(c.name, &c);
|
||||||
|
}
|
||||||
|
|
||||||
TestingSetup test;
|
TestingSetup test;
|
||||||
m_node.setContext(&test.m_node);
|
m_node.setContext(&test.m_node);
|
||||||
|
|
Loading…
Add table
Reference in a new issue