server: update to latest htlcswitch API changes
This commit is contained in:
parent
cae99134e1
commit
11f7a227ab
@ -237,7 +237,9 @@ func newServer(listenAddrs []string, chanDB *channeldb.DB, cc *chainControl,
|
|||||||
ChainView: cc.chainView,
|
ChainView: cc.chainView,
|
||||||
SendToSwitch: func(firstHop *btcec.PublicKey,
|
SendToSwitch: func(firstHop *btcec.PublicKey,
|
||||||
htlcAdd *lnwire.UpdateAddHTLC) ([32]byte, error) {
|
htlcAdd *lnwire.UpdateAddHTLC) ([32]byte, error) {
|
||||||
firstHopPub := firstHop.SerializeCompressed()
|
|
||||||
|
var firstHopPub [33]byte
|
||||||
|
copy(firstHopPub[:], firstHop.SerializeCompressed())
|
||||||
return s.htlcSwitch.SendHTLC(firstHopPub, htlcAdd)
|
return s.htlcSwitch.SendHTLC(firstHopPub, htlcAdd)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -597,8 +599,7 @@ func (s *server) peerTerminationWatcher(p *peer) {
|
|||||||
// Tell the switch to remove all links associated with this peer.
|
// Tell the switch to remove all links associated with this peer.
|
||||||
// Passing nil as the target link indicates that all links associated
|
// Passing nil as the target link indicates that all links associated
|
||||||
// with this interface should be closed.
|
// with this interface should be closed.
|
||||||
hop := htlcswitch.NewHopID(p.addr.IdentityKey.SerializeCompressed())
|
links, err := p.server.htlcSwitch.GetLinksByInterface(p.pubKeyBytes)
|
||||||
links, err := p.server.htlcSwitch.GetLinks(hop)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
srvrLog.Errorf("unable to get channel links: %v", err)
|
srvrLog.Errorf("unable to get channel links: %v", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user