| 110 | } |
| 111 | |
| 112 | static struct command_result * |
| 113 | test_field_eq(struct command *cmd, |
| 114 | const struct inv *inv, |
| 115 | const tal_t *invfield, |
| 116 | const tal_t *offerfield, |
| 117 | const char *fieldname) |
| 118 | { |
| 119 | if (invfield && !offerfield) |
| 120 | return fail_inv(cmd, inv, "Unexpected %s", fieldname); |
| 121 | if (!invfield && offerfield) |
| 122 | return fail_inv(cmd, inv, "Expected %s", fieldname); |
| 123 | if (!memeq(invfield, tal_bytelen(invfield), |
| 124 | offerfield, tal_bytelen(offerfield))) |
| 125 | return fail_inv(cmd, inv, "Different %s", fieldname); |
| 126 | return NULL; |
| 127 | } |
| 128 | |
| 129 | static struct command_result *pay_done(struct command *cmd, |
| 130 | const char *buf, |
nothing calls this directly
no test coverage detected