aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-04-30 19:53:31 +0200
committerMarcoFalke <falke.marco@gmail.com>2021-05-03 11:50:05 +0200
commitfa2197c8b3178787d99e2acb5c3c717df14ddabf (patch)
tree05e8db79da4b58f8d009f65e8ae9e62cabdc49a6 /src/qt
parentb8593616dc2ab5b8f81edd8b2408d400e3b696cd (diff)
test: Use loop to register RPCs
The same loop is used by the server, so no need for the tests to do this differently.
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/test/rpcnestedtests.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qt/test/rpcnestedtests.cpp b/src/qt/test/rpcnestedtests.cpp
index 9e6e98b274..df3b85ea71 100644
--- a/src/qt/test/rpcnestedtests.cpp
+++ b/src/qt/test/rpcnestedtests.cpp
@@ -35,14 +35,16 @@ static RPCHelpMan rpcNestedTest_rpc()
}
static const CRPCCommand vRPCCommands[] = {
- {"test", &rpcNestedTest_rpc},
+ {"rpcNestedTest", &rpcNestedTest_rpc},
};
void RPCNestedTests::rpcNestedTests()
{
// do some test setup
// 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;
m_node.setContext(&test.m_node);