Skip to content

Commit fa2197c

Browse files
author
MarcoFalke
committed
test: Use loop to register RPCs
The same loop is used by the server, so no need for the tests to do this differently.
1 parent b859361 commit fa2197c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/qt/test/rpcnestedtests.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,16 @@ static RPCHelpMan rpcNestedTest_rpc()
3535
}
3636

3737
static const CRPCCommand vRPCCommands[] = {
38-
{"test", &rpcNestedTest_rpc},
38+
{"rpcNestedTest", &rpcNestedTest_rpc},
3939
};
4040

4141
void RPCNestedTests::rpcNestedTests()
4242
{
4343
// do some test setup
4444
// could be moved to a more generic place when we add more tests on QT level
45-
tableRPC.appendCommand("rpcNestedTest", &vRPCCommands[0]);
45+
for (const auto& c : vRPCCommands) {
46+
tableRPC.appendCommand(c.name, &c);
47+
}
4648

4749
TestingSetup test;
4850
m_node.setContext(&test.m_node);

0 commit comments

Comments
 (0)