Automated testing of mappings in RPC server registration and client arg conversion #10751

Open
TheBlueMatt opened this Issue Jul 5, 2017 · 3 comments

Comments

Projects
None yet
4 participants
Contributor

TheBlueMatt commented Jul 5, 2017

#10747 fixed an issue where out client-side args type conversions got de-synced from our server-side named arguments -> arg position mappings. It would be super nice to have some kind of automated tester for that as I'm afraid simple typos will go entirely unnoticed.

Member

luke-jr commented Jul 5, 2017

I agree. But I wonder if it's possible to just use the main RPC arg list rather than having two mapping lists?

Contributor

TheBlueMatt commented Jul 5, 2017

Owner

laanwj commented Jul 6, 2017 edited

I actually have a script for this, just need to hook it in (and update it for the new "a|b" syntax).

I agree. But I wonder if it's possible to just use the main RPC arg list rather than having two mapping lists?

The problem is indeed one of dependencies. There is no way the -cli can access the server implementation files (rpc/misc.cpp etc). which contain the dispatch tables.

An old idea is to remove all command-specific knowledge from the cli and instead request a JSON document from the server that describes the interface. This, in combination with smart caching to prevent extra roundtrips, could work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment