diff --git a/channeld/full_channel.c b/channeld/full_channel.c index 765fae555..b2c4bbab0 100644 --- a/channeld/full_channel.c +++ b/channeld/full_channel.c @@ -684,7 +684,7 @@ bool channel_rcvd_revoke_and_ack(struct channel *channel, status_trace("Received revoke_and_ack"); change = change_htlcs(channel, LOCAL, states, ARRAY_SIZE(states), htlcs, "rcvd_revoke_and_ack"); - return change & HTLC_LOCAL_F_COMMITTED; + return change & HTLC_LOCAL_F_PENDING; } /* FIXME: We can actually merge these two... */ diff --git a/lightningd/test/run-channel.c b/lightningd/test/run-channel.c index b436cfb57..74fcaa21d 100644 --- a/lightningd/test/run-channel.c +++ b/lightningd/test/run-channel.c @@ -161,7 +161,7 @@ static const struct htlc **include_htlcs(struct channel *channel, enum side side ret = channel_sending_commit(channel, &changed_htlcs); assert(ret); ret = channel_rcvd_revoke_and_ack(channel, &changed_htlcs); - assert(!ret); + assert(ret); ret = channel_rcvd_commit(channel, &changed_htlcs); assert(ret); ret = channel_sending_revoke_and_ack(channel); @@ -257,7 +257,7 @@ static void send_and_fulfill_htlc(struct channel *channel, ret = channel_sending_commit(channel, &changed_htlcs); assert(ret); ret = channel_rcvd_revoke_and_ack(channel, &changed_htlcs); - assert(!ret); + assert(ret); ret = channel_rcvd_commit(channel, &changed_htlcs); assert(ret); ret = channel_sending_revoke_and_ack(channel); @@ -288,7 +288,7 @@ static void send_and_fulfill_htlc(struct channel *channel, ret = channel_sending_commit(channel, &changed_htlcs); assert(ret); ret = channel_rcvd_revoke_and_ack(channel, &changed_htlcs); - assert(!ret); + assert(ret); ret = channel_rcvd_commit(channel, &changed_htlcs); assert(ret); ret = channel_sending_revoke_and_ack(channel);