| 80 | } |
| 81 | |
| 82 | void bitcoind_check_commands(struct bitcoind *bitcoind) |
| 83 | { |
| 84 | size_t i; |
| 85 | struct plugin *p; |
| 86 | |
| 87 | for (i = 0; i < ARRAY_SIZE(methods); i++) { |
| 88 | p = find_plugin_for_command(bitcoind->ld, methods[i]); |
| 89 | if (p == NULL) { |
| 90 | /* For testing .. */ |
| 91 | log_debug(bitcoind->ld->log, "Missing a Bitcoin plugin" |
| 92 | " command"); |
| 93 | fatal("Could not access the plugin for %s, is a " |
| 94 | "Bitcoin plugin (by default plugins/bcli) " |
| 95 | "registered ?", methods[i]); |
| 96 | } |
| 97 | wait_plugin(bitcoind, methods[i], p); |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | /* Our Bitcoin backend plugin gave us a bad response. We can't recover. */ |
| 102 | static void bitcoin_plugin_error(struct bitcoind *bitcoind, const char *buf, |
no test coverage detected