server+netann+peer: put peer's alias in Update, proper config for link

This commit modifies the netann subsystem to use the peer's alias
for ChannelUpdates where appropriate (i.e. in case we are sending
the alias to the peer). It also modifies the loadActiveChannels
function in the peer package to handle upgrading a channel when the
scid-alias feature bit is turned on.
This commit is contained in:
eugene
2022-04-04 16:56:29 -04:00
parent 778be5be58
commit b9ef26061a
5 changed files with 144 additions and 15 deletions

View File

@@ -340,7 +340,11 @@ func createTestPeer(notifier chainntnfs.ChainNotifier,
OurPubKey: aliceKeyPub,
OurKeyLoc: testKeyLoc,
IsChannelActive: func(lnwire.ChannelID) bool { return true },
ApplyChannelUpdate: func(*lnwire.ChannelUpdate) error { return nil },
ApplyChannelUpdate: func(*lnwire.ChannelUpdate,
*wire.OutPoint, bool) error {
return nil
},
})
if err != nil {
return nil, nil, nil, err