daemon: rename CMD_SEND_HTLC_UPDATE to CMD_SEND_HTLC_ADD

There are other updates than just adding an HTLC; make this explicit.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-03-08 10:42:15 +10:30
parent 4f67b59c26
commit 983000428f
6 changed files with 25 additions and 26 deletions

View File

@@ -134,8 +134,8 @@ Pkt *pkt_open_complete(const tal_t *ctx, const struct peer *peer)
return make_pkt(ctx, PKT__PKT_OPEN_COMPLETE, o);
}
Pkt *pkt_htlc_update(const tal_t *ctx, const struct peer *peer,
const struct htlc_progress *htlc_prog)
Pkt *pkt_htlc_add(const tal_t *ctx, const struct peer *peer,
const struct htlc_progress *htlc_prog)
{
UpdateAddHtlc *u = tal(ctx, UpdateAddHtlc);
@@ -423,9 +423,9 @@ static Pkt *decline_htlc(const tal_t *ctx, const char *why)
return make_pkt(ctx, PKT__PKT_UPDATE_DECLINE_HTLC, d);
}
Pkt *accept_pkt_htlc_update(const tal_t *ctx,
struct peer *peer, const Pkt *pkt,
Pkt **decline)
Pkt *accept_pkt_htlc_add(const tal_t *ctx,
struct peer *peer, const Pkt *pkt,
Pkt **decline)
{
const UpdateAddHtlc *u = pkt->update_add_htlc;
struct htlc_progress *cur = tal(peer, struct htlc_progress);

View File

@@ -1388,7 +1388,7 @@ static void do_newhtlc(struct peer *peer, struct newhtlc *newhtlc)
set_htlc_command(peer, cstate, newhtlc->jsoncmd,
&cstate->a.htlcs[tal_count(cstate->a.htlcs)-1],
CMD_SEND_HTLC_UPDATE, NULL);
CMD_SEND_HTLC_ADD, NULL);
}
static void json_newhtlc(struct command *cmd,