onionreply used if pay_errcode == PAY_UNPARSEABLE_ONION */
| 242 | |
| 243 | /* onionreply used if pay_errcode == PAY_UNPARSEABLE_ONION */ |
| 244 | static struct command_result * |
| 245 | sendpay_fail(struct command *cmd, |
| 246 | const struct wallet_payment *payment, |
| 247 | enum jsonrpc_errcode pay_errcode, |
| 248 | const struct onionreply *onionreply, |
| 249 | const struct routing_failure *fail, |
| 250 | const char *errmsg) |
| 251 | { |
| 252 | struct json_stream *data; |
| 253 | |
| 254 | data = json_stream_fail(cmd, pay_errcode, |
| 255 | errmsg); |
| 256 | json_sendpay_fail_fields(data, |
| 257 | payment, |
| 258 | pay_errcode, |
| 259 | onionreply, |
| 260 | fail); |
| 261 | json_object_end(data); |
| 262 | return command_failed(cmd, data); |
| 263 | } |
| 264 | |
| 265 | /* We defer sendpay "success" until we know it's pending; consumes cmd */ |
| 266 | static struct command_result * |
no test coverage detected