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
|
|
@ -306,6 +306,15 @@ func (s *loopOutSwap) sendUpdate(ctx context.Context) error {
|
|||
|
||||
info.HtlcAddressP2WSH = s.htlc.Address
|
||||
|
||||
// In order to avoid potentially dangerous ownership sharing
|
||||
// we copy the outgoing channel set.
|
||||
if s.OutgoingChanSet != nil {
|
||||
outgoingChanSet := make(loopdb.ChannelSet, len(s.OutgoingChanSet))
|
||||
copy(outgoingChanSet[:], s.OutgoingChanSet[:])
|
||||
|
||||
info.OutgoingChanSet = outgoingChanSet
|
||||
}
|
||||
|
||||
select {
|
||||
case s.statusChan <- *info:
|
||||
case <-ctx.Done():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue