| 2040 | } |
| 2041 | |
| 2042 | static struct command_result * |
| 2043 | validate_splice_cmd(struct splice_cmd *splice_cmd) |
| 2044 | { |
| 2045 | struct splice_script_result *action; |
| 2046 | int paying_fee_count = 0; |
| 2047 | for (size_t i = 0; i < tal_count(splice_cmd->actions); i++) { |
| 2048 | action = splice_cmd->actions[i]; |
| 2049 | if (action->pays_fee) { |
| 2050 | if (paying_fee_count) |
| 2051 | return command_fail(splice_cmd->cmd, |
| 2052 | JSONRPC2_INVALID_PARAMS, |
| 2053 | "Only one item may pay the" |
| 2054 | " fee"); |
| 2055 | paying_fee_count++; |
| 2056 | } |
| 2057 | if (action->bitcoin_address && action->in_ppm) |
| 2058 | return command_fail(splice_cmd->cmd, |
| 2059 | JSONRPC2_INVALID_PARAMS, |
| 2060 | "Dynamic bitcoin address amounts" |
| 2061 | " not supported for now"); |
| 2062 | if (action->bitcoin_address) |
| 2063 | return command_fail(splice_cmd->cmd, |
| 2064 | JSONRPC2_INVALID_PARAMS, |
| 2065 | "Paying out to bitcoin addresses" |
| 2066 | " not supported for now."); |
| 2067 | } |
| 2068 | |
| 2069 | return NULL; |
| 2070 | } |
| 2071 | |
| 2072 | static struct command_result *listpeerchannels_get_result(struct command *cmd, |
| 2073 | const char *methodname, |
no test coverage detected