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:
1 parent
4fe174ba4e
commit
8c0c53eac3
2 files changed
+24
-9
No files matched your search
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user