htlcswitch: only error in closeCircuit if the htlc was failed

This commit changes the switch to only log an error if update_fail_htlc
comes in and closeCircuit returns ErrUnknownCircuit. Rationale
being that only settles should hit this code path, anything else
is a result of a link flap and should be treated as an error.
This commit is contained in:
nsa committed 2020-03-25 11:53:46 -04:00
1 parent 4fe174ba4e
commit 8c0c53eac3
2 files changed
+24 -9

No files matched your search

+2 -2
View File
@@ -761,8 +761,8 @@ func TestSwitchForwardSettleAfterFullAdd(t *testing.T) {
}
// Send the settle packet again, which should fail.
if err := s2.forward(settle); err == nil {
t.Fatalf("expected failure when sending duplicate settle " +
if err := s2.forward(settle); err != nil {
t.Fatalf("expected success when sending duplicate settle " +
"with no pending circuit")
}
}