mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-03 17:26:57 +01:00
multi: add more trace logs regarding link activate flow
This commit is contained in:
parent
ae39cd9e91
commit
2b8e9a0d36
4 changed files with 17 additions and 3 deletions
|
@ -1294,7 +1294,7 @@ func (d *AuthenticatedGossiper) sendRemoteBatch(annBatch []msgWithSenders) {
|
|||
// We'll first attempt to filter out this new message for all peers
|
||||
// that have active gossip syncers active.
|
||||
for pub, syncer := range syncerPeers {
|
||||
log.Tracef("Sending messages batch to GossipSyncer(%x)", pub)
|
||||
log.Tracef("Sending messages batch to GossipSyncer(%s)", pub)
|
||||
syncer.FilterGossipMsgs(annBatch...)
|
||||
}
|
||||
|
||||
|
|
|
@ -111,7 +111,11 @@ func messageStoreKey(msg lnwire.Message, peerPubKey [33]byte) ([]byte, error) {
|
|||
|
||||
// AddMessage adds a message to the store for this peer.
|
||||
func (s *MessageStore) AddMessage(msg lnwire.Message, peerPubKey [33]byte) error {
|
||||
// Construct the key for which we'll find this message with in the store.
|
||||
log.Tracef("Adding message of type %v to store for peer %x",
|
||||
msg.MsgType(), peerPubKey)
|
||||
|
||||
// Construct the key for which we'll find this message with in the
|
||||
// store.
|
||||
msgKey, err := messageStoreKey(msg, peerPubKey)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -137,6 +141,9 @@ func (s *MessageStore) AddMessage(msg lnwire.Message, peerPubKey [33]byte) error
|
|||
func (s *MessageStore) DeleteMessage(msg lnwire.Message,
|
||||
peerPubKey [33]byte) error {
|
||||
|
||||
log.Tracef("Deleting message of type %v from store for peer %x",
|
||||
msg.MsgType(), peerPubKey)
|
||||
|
||||
// Construct the key for which we'll find this message with in the
|
||||
// store.
|
||||
msgKey, err := messageStoreKey(msg, peerPubKey)
|
||||
|
|
|
@ -710,6 +710,9 @@ func (l *channelLink) syncChanStates() error {
|
|||
// first message sent MUST be the ChanSync message.
|
||||
select {
|
||||
case msg := <-l.upstream:
|
||||
l.log.Tracef("Received msg=%v from peer(%x)", msg.MsgType(),
|
||||
l.cfg.Peer.PubKey())
|
||||
|
||||
remoteChanSyncMsg, ok := msg.(*lnwire.ChannelReestablish)
|
||||
if !ok {
|
||||
return fmt.Errorf("first message sent to sync "+
|
||||
|
|
|
@ -776,7 +776,8 @@ func (p *Brontide) loadActiveChannels(chans []*channeldb.OpenChannel) (
|
|||
|
||||
chanID := lnwire.NewChanIDFromOutPoint(chanPoint)
|
||||
|
||||
p.log.Infof("loading ChannelPoint(%v)", chanPoint)
|
||||
p.log.Infof("Loading ChannelPoint(%v), isPending=%v",
|
||||
chanPoint, lnChan.IsPending())
|
||||
|
||||
// Skip adding any permanently irreconcilable channels to the
|
||||
// htlcswitch.
|
||||
|
@ -1318,6 +1319,8 @@ func (ms *msgStream) AddMsg(msg lnwire.Message) {
|
|||
func waitUntilLinkActive(p *Brontide,
|
||||
cid lnwire.ChannelID) htlcswitch.ChannelUpdateHandler {
|
||||
|
||||
p.log.Tracef("Waiting for link=%v to be active", cid)
|
||||
|
||||
// Subscribe to receive channel events.
|
||||
//
|
||||
// NOTE: If the link is already active by SubscribeChannelEvents, then
|
||||
|
@ -1395,6 +1398,7 @@ func newChanMsgStream(p *Brontide, cid lnwire.ChannelID) *msgStream {
|
|||
// If the link is still not active and the calling function
|
||||
// errored out, just return.
|
||||
if chanLink == nil {
|
||||
p.log.Warnf("Link=%v is not active")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue