mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-20 10:39:49 +01:00
peer: use correct enum in case statement.
These are the same, but we're using the ones from state.h instead of the packet types directly. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
feecabacce
commit
25bb0f5248
@ -1469,15 +1469,15 @@ static bool normal_pkt_in(struct peer *peer, const Pkt *pkt)
|
|||||||
|| peer->state == STATE_NORMAL_COMMITTING);
|
|| peer->state == STATE_NORMAL_COMMITTING);
|
||||||
|
|
||||||
switch (pkt->pkt_case) {
|
switch (pkt->pkt_case) {
|
||||||
case PKT_UPDATE_ADD_HTLC:
|
case PKT__PKT_UPDATE_ADD_HTLC:
|
||||||
err = handle_pkt_htlc_add(peer, pkt);
|
err = handle_pkt_htlc_add(peer, pkt);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PKT_UPDATE_FULFILL_HTLC:
|
case PKT__PKT_UPDATE_FULFILL_HTLC:
|
||||||
err = handle_pkt_htlc_fulfill(peer, pkt);
|
err = handle_pkt_htlc_fulfill(peer, pkt);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PKT_UPDATE_FAIL_HTLC:
|
case PKT__PKT_UPDATE_FAIL_HTLC:
|
||||||
err = handle_pkt_htlc_fail(peer, pkt);
|
err = handle_pkt_htlc_fail(peer, pkt);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1485,11 +1485,11 @@ static bool normal_pkt_in(struct peer *peer, const Pkt *pkt)
|
|||||||
err = handle_pkt_feechange(peer, pkt);
|
err = handle_pkt_feechange(peer, pkt);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PKT_UPDATE_COMMIT:
|
case PKT__PKT_UPDATE_COMMIT:
|
||||||
err = handle_pkt_commit(peer, pkt);
|
err = handle_pkt_commit(peer, pkt);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PKT_CLOSE_SHUTDOWN:
|
case PKT__PKT_CLOSE_SHUTDOWN:
|
||||||
err = accept_pkt_close_shutdown(peer, pkt);
|
err = accept_pkt_close_shutdown(peer, pkt);
|
||||||
if (err)
|
if (err)
|
||||||
break;
|
break;
|
||||||
@ -1499,7 +1499,7 @@ static bool normal_pkt_in(struct peer *peer, const Pkt *pkt)
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case PKT_UPDATE_REVOCATION:
|
case PKT__PKT_UPDATE_REVOCATION:
|
||||||
if (peer->state == STATE_NORMAL_COMMITTING) {
|
if (peer->state == STATE_NORMAL_COMMITTING) {
|
||||||
err = handle_pkt_revocation(peer, pkt, STATE_NORMAL);
|
err = handle_pkt_revocation(peer, pkt, STATE_NORMAL);
|
||||||
if (!err)
|
if (!err)
|
||||||
|
Loading…
Reference in New Issue
Block a user