mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
state: fix case where we replied to an error with an error.
Found by fixing bogus test in test_state_coverage.c Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -1418,13 +1418,14 @@ static const char *apply_effects(struct peer *peer,
|
||||
*output = effect->u.send_pkt;
|
||||
|
||||
/* Check for errors. */
|
||||
if (strstarts(pkt, "ERROR_PKT:")) {
|
||||
if (strstarts(pkt, "PKT_ERROR: ")) {
|
||||
/* Some are expected. */
|
||||
if (!streq(pkt, "ERROR_PKT:Commit tx noticed")
|
||||
&& !streq(pkt, "ERROR_PKT:Otherspend noticed")
|
||||
&& !streq(pkt, "ERROR_PKT:Anchor timed out")
|
||||
&& !streq(pkt, "ERROR_PKT:Close timed out")
|
||||
&& !streq(pkt, "ERROR_PKT:Close forced due to HTLCs")) {
|
||||
if (!streq(pkt, "PKT_ERROR: Commit tx noticed")
|
||||
&& !streq(pkt, "PKT_ERROR: Otherspend noticed")
|
||||
&& !streq(pkt, "PKT_ERROR: Error inject")
|
||||
&& !streq(pkt, "PKT_ERROR: Anchor timed out")
|
||||
&& !streq(pkt, "PKT_ERROR: Close timed out")
|
||||
&& !streq(pkt, "PKT_ERROR: Close forced due to HTLCs")) {
|
||||
return pkt;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user