mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
swap: add lasthop, outgoingchanids to swapinfo
This commit is contained in:
parent
e98d813885
commit
efb6f75d60
5 changed files with 50 additions and 3 deletions
|
|
@ -431,6 +431,14 @@ func (s *loopInSwap) sendUpdate(ctx context.Context) error {
|
|||
info.HtlcAddressNP2WSH = s.htlcNP2WSH.Address
|
||||
info.ExternalHtlc = s.ExternalHtlc
|
||||
|
||||
// In order to avoid potentially dangerous ownership sharing
|
||||
// we copy the last hop vertex.
|
||||
if s.LastHop != nil {
|
||||
lastHop := &route.Vertex{}
|
||||
copy(lastHop[:], s.LastHop[:])
|
||||
info.LastHop = lastHop
|
||||
}
|
||||
|
||||
select {
|
||||
case s.statusChan <- *info:
|
||||
case <-ctx.Done():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue