Synchronous routine to send command and extract fields from response */
| 831 | |
| 832 | /* Synchronous routine to send command and extract fields from response */ |
| 833 | void rpc_scan(struct command *cmd, |
| 834 | const char *method, |
| 835 | const struct json_out *params TAKES, |
| 836 | const char *guide, |
| 837 | ...) |
| 838 | { |
| 839 | const char *err; |
| 840 | va_list ap; |
| 841 | |
| 842 | va_start(ap, guide); |
| 843 | err = rpc_scan_core(tmpctx, cmd->plugin, method, params, guide, ap); |
| 844 | va_end(ap); |
| 845 | |
| 846 | if (err) |
| 847 | plugin_err(cmd->plugin, "Could not parse %s in reply to %s: %s", |
| 848 | guide, method, err); |
| 849 | } |
| 850 | |
| 851 | void json_add_keypath(struct json_out *jout, |
| 852 | const char *fieldname, |