mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
state: Don't change priority on decline.
This means it's always reflects the bottom bit (maybe inverted) of the commit tx number. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
4d74fd165f
commit
2f1414362c
8
state.c
8
state.c
@ -397,8 +397,8 @@ enum state state(const enum state state, const struct state_data *sdata,
|
||||
if (input_is(input, PKT_UPDATE_DECLINE_HTLC)) {
|
||||
fail_cmd(effect, CMD_SEND_HTLC_UPDATE, idata->pkt);
|
||||
set_effect(effect, htlc_abandon, true);
|
||||
/* Toggle between high and low priority states. */
|
||||
return toggle_prio(state, STATE_NORMAL);
|
||||
/* No update means no priority change. */
|
||||
return prio(state, STATE_NORMAL);
|
||||
/* They can't close with an HTLC, so only possible here */
|
||||
} else if (input_is(input, PKT_CLOSE)) {
|
||||
fail_cmd(effect, CMD_SEND_UPDATE_ANY, NULL);
|
||||
@ -979,8 +979,8 @@ accept_htlc_update:
|
||||
goto err_start_unilateral_close;
|
||||
if (decline) {
|
||||
set_effect(effect, send, decline);
|
||||
/* Toggle between high/low priority states. */
|
||||
return toggle_prio(state, STATE_NORMAL);
|
||||
/* No update means no priority change. */
|
||||
return prio(state, STATE_NORMAL);
|
||||
}
|
||||
set_effect(effect, htlc_in_progress, htlcprog);
|
||||
set_effect(effect, send, pkt_update_accept(effect, sdata));
|
||||
|
Loading…
Reference in New Issue
Block a user