htlcswitch/switch: remove numPendingPayments only used in tests

This commit is contained in:
Johan T. Halseth 2019-05-16 15:27:28 +02:00
parent cff4d3547d
commit be129eb7c7
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26
2 changed files with 0 additions and 13 deletions

@ -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) {

@ -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