htlcswitch/switch: remove numPendingPayments only used in tests
This commit is contained in:
parent
cff4d3547d
commit
be129eb7c7
@ -2206,15 +2206,6 @@ func (s *Switch) CircuitModifier() CircuitModifier {
|
|||||||
return s.circuits
|
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.
|
// commitCircuits persistently adds a circuit to the switch's circuit map.
|
||||||
func (s *Switch) commitCircuits(circuits ...*PaymentCircuit) (
|
func (s *Switch) commitCircuits(circuits ...*PaymentCircuit) (
|
||||||
*CircuitFwdActions, error) {
|
*CircuitFwdActions, error) {
|
||||||
|
@ -1798,10 +1798,6 @@ func TestSwitchSendPayment(t *testing.T) {
|
|||||||
case <-time.After(time.Second):
|
case <-time.After(time.Second):
|
||||||
t.Fatal("err wasn't received")
|
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
|
// TestLocalPaymentNoForwardingEvents tests that if we send a series of locally
|
||||||
|
Loading…
Reference in New Issue
Block a user