diff --git a/htlcswitch/switch.go b/htlcswitch/switch.go index a41081cea..e45ab4f96 100644 --- a/htlcswitch/switch.go +++ b/htlcswitch/switch.go @@ -2206,15 +2206,6 @@ func (s *Switch) CircuitModifier() CircuitModifier { return s.circuits } -// numPendingPayments is helper function which returns the overall number of -// pending user payments. -func (s *Switch) numPendingPayments() int { - s.pendingMutex.RLock() - defer s.pendingMutex.RUnlock() - - return len(s.pendingPayments) -} - // commitCircuits persistently adds a circuit to the switch's circuit map. func (s *Switch) commitCircuits(circuits ...*PaymentCircuit) ( *CircuitFwdActions, error) { diff --git a/htlcswitch/switch_test.go b/htlcswitch/switch_test.go index 73aee0ad7..693e9bcc0 100644 --- a/htlcswitch/switch_test.go +++ b/htlcswitch/switch_test.go @@ -1798,10 +1798,6 @@ func TestSwitchSendPayment(t *testing.T) { case <-time.After(time.Second): t.Fatal("err wasn't received") } - - if s.numPendingPayments() != 0 { - t.Fatal("wrong amount of pending payments") - } } // TestLocalPaymentNoForwardingEvents tests that if we send a series of locally