Skip to content

Commit

Permalink
swap: remove redundant prepayment probe
Browse files Browse the repository at this point in the history
The prepayment probe, which includes the expected payment amount
for the fee invoice, is conducted at the start of the swapout.
The prepayment probe at this stage is inaccurate
and may cause unnecessary communication, so it will be removed.
  • Loading branch information
YusukeShimizu committed Jul 19, 2024
1 parent 769785d commit 144f9d1
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions swap/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,14 +391,6 @@ func (s *SwapService) SwapOut(peer string, chain string, channelId string, initi
return nil, fmt.Errorf("exceeding spendable amount_msat: %d", sp)
}

success, failureReason, err := s.swapServices.lightning.ProbePayment(channelId, amtSat*1000)
if err != nil {
return nil, err
}
if !success {
return nil, fmt.Errorf("the prepayment probe was unsuccessful: %s", failureReason)
}

swap := newSwapOutSenderFSM(s.swapServices, initiator, peer)
err = s.lockSwap(swap.SwapId.String(), channelId, swap)
if err != nil {
Expand Down

0 comments on commit 144f9d1

Please sign in to comment.