loop+test: add loop-in route hint regression

This commit is contained in:
Boris Nagaev 2026-04-15 00:29:08 -05:00
parent bfbc180e4b
commit e1f1077f44
No known key found for this signature in database
3 changed files with 85 additions and 6 deletions

View file

@ -40,9 +40,10 @@ type serverMock struct {
height int32
swapInvoice string
swapHash lntypes.Hash
prepayHash lntypes.Hash
swapInvoice string
probeInvoice string
swapHash lntypes.Hash
prepayHash lntypes.Hash
// preimagePush is a channel that preimage pushes are sent into.
preimagePush chan lntypes.Preimage
@ -157,7 +158,7 @@ func getInvoice(hash lntypes.Hash, amt btcutil.Amount, memo string) (string, err
}
func (s *serverMock) NewLoopInSwap(_ context.Context, swapHash lntypes.Hash,
amount btcutil.Amount, _, _ [33]byte, swapInvoice, _ string,
amount btcutil.Amount, _, _ [33]byte, swapInvoice, probeInvoice string,
_ *route.Vertex, _ string) (*newLoopInResponse, error) {
_, receiverKey := test.CreateKey(101)
@ -175,6 +176,7 @@ func (s *serverMock) NewLoopInSwap(_ context.Context, swapHash lntypes.Hash,
)
s.swapInvoice = swapInvoice
s.probeInvoice = probeInvoice
s.swapHash = swapHash
// Simulate the server paying the probe invoice and expect the client to