mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-19 05:45:21 +01:00
switch+test: fix race condition in unit test
This commit is contained in:
parent
802544b62a
commit
64ea883105
@ -101,6 +101,10 @@
|
||||
* [Make etcd leader election session
|
||||
TTL](https://github.com/lightningnetwork/lnd/pull/6342) configurable.
|
||||
|
||||
|
||||
* [Fix race condition in the htlc interceptor unit
|
||||
test](https://github.com/lightningnetwork/lnd/pull/6353).
|
||||
|
||||
## RPC Server
|
||||
|
||||
* [Add value to the field
|
||||
|
@ -3287,7 +3287,7 @@ func TestSwitchHoldForward(t *testing.T) {
|
||||
assertNumCircuits(t, s, 0, 0)
|
||||
assertOutgoingLinkReceive(t, bobChannelLink, false)
|
||||
|
||||
require.NoError(t, switchForwardInterceptor.resolve(&FwdResolution{
|
||||
require.NoError(t, switchForwardInterceptor.Resolve(&FwdResolution{
|
||||
Action: FwdActionResume,
|
||||
Key: forwardInterceptor.getIntercepted().IncomingCircuit,
|
||||
}))
|
||||
@ -3347,7 +3347,7 @@ func TestSwitchHoldForward(t *testing.T) {
|
||||
assertNumCircuits(t, s, 0, 0)
|
||||
assertOutgoingLinkReceive(t, bobChannelLink, false)
|
||||
|
||||
require.NoError(t, switchForwardInterceptor.resolve(&FwdResolution{
|
||||
require.NoError(t, switchForwardInterceptor.Resolve(&FwdResolution{
|
||||
Action: FwdActionFail,
|
||||
Key: forwardInterceptor.getIntercepted().IncomingCircuit,
|
||||
FailureCode: lnwire.CodeTemporaryChannelFailure,
|
||||
@ -3364,7 +3364,7 @@ func TestSwitchHoldForward(t *testing.T) {
|
||||
assertOutgoingLinkReceive(t, bobChannelLink, false)
|
||||
|
||||
reason := lnwire.OpaqueReason([]byte{1, 2, 3})
|
||||
require.NoError(t, switchForwardInterceptor.resolve(&FwdResolution{
|
||||
require.NoError(t, switchForwardInterceptor.Resolve(&FwdResolution{
|
||||
Action: FwdActionFail,
|
||||
Key: forwardInterceptor.getIntercepted().IncomingCircuit,
|
||||
FailureMessage: reason,
|
||||
@ -3385,7 +3385,7 @@ func TestSwitchHoldForward(t *testing.T) {
|
||||
assertOutgoingLinkReceive(t, bobChannelLink, false)
|
||||
|
||||
code := lnwire.CodeInvalidOnionKey
|
||||
require.NoError(t, switchForwardInterceptor.resolve(&FwdResolution{
|
||||
require.NoError(t, switchForwardInterceptor.Resolve(&FwdResolution{
|
||||
Action: FwdActionFail,
|
||||
Key: forwardInterceptor.getIntercepted().IncomingCircuit,
|
||||
FailureCode: code,
|
||||
@ -3413,7 +3413,7 @@ func TestSwitchHoldForward(t *testing.T) {
|
||||
assertNumCircuits(t, s, 0, 0)
|
||||
assertOutgoingLinkReceive(t, bobChannelLink, false)
|
||||
|
||||
require.NoError(t, switchForwardInterceptor.resolve(&FwdResolution{
|
||||
require.NoError(t, switchForwardInterceptor.Resolve(&FwdResolution{
|
||||
Key: forwardInterceptor.getIntercepted().IncomingCircuit,
|
||||
Action: FwdActionSettle,
|
||||
Preimage: preimage,
|
||||
@ -3473,7 +3473,7 @@ func TestSwitchHoldForward(t *testing.T) {
|
||||
intercepted := forwardInterceptor.getIntercepted()
|
||||
|
||||
// Settle the packet.
|
||||
require.NoError(t, switchForwardInterceptor.resolve(&FwdResolution{
|
||||
require.NoError(t, switchForwardInterceptor.Resolve(&FwdResolution{
|
||||
Key: intercepted.IncomingCircuit,
|
||||
Action: FwdActionSettle,
|
||||
Preimage: preimage,
|
||||
|
Loading…
Reference in New Issue
Block a user