Output a route hop */
| 70 | |
| 71 | /* Output a route hop */ |
| 72 | static void json_add_route_hop(struct json_stream *js, |
| 73 | const char *fieldname, |
| 74 | const struct route_hop *r) |
| 75 | { |
| 76 | /* Imitate what getroute/sendpay use */ |
| 77 | json_object_start(js, fieldname); |
| 78 | json_add_node_id(js, "id", &r->node_id); |
| 79 | json_add_short_channel_id(js, "channel", r->scid); |
| 80 | json_add_num(js, "direction", r->direction); |
| 81 | json_add_amount_msat(js, "amount_msat", r->amount); |
| 82 | json_add_num(js, "delay", r->delay); |
| 83 | json_add_string(js, "style", "tlv"); |
| 84 | json_object_end(js); |
| 85 | } |
| 86 | |
| 87 | struct getroute_info { |
| 88 | struct node_id *destination; |
no test coverage detected