multi: Unify use of NodeKey in log messages

This commit is contained in:
MeshCollider 2018-02-20 12:01:23 +13:00 committed by Olaoluwa Osuntokun
parent 4c42079436
commit 2c2ed3c6a9
3 changed files with 10 additions and 10 deletions

View File

@ -274,7 +274,7 @@ func (p *peer) Start() error {
// registering them with the switch and launching the necessary
// goroutines required to operate them.
peerLog.Debugf("Loaded %v active channels from database with "+
"peerIDKey(%x)", len(activeChans), p.PubKey())
"NodeKey(%x)", len(activeChans), p.PubKey())
if err := p.loadActiveChannels(activeChans); err != nil {
return fmt.Errorf("unable to load channels: %v", err)
}
@ -308,7 +308,7 @@ func (p *peer) loadActiveChannels(chans []*channeldb.OpenChannel) error {
p.activeChannels[chanID] = lnChan
p.activeChanMtx.Unlock()
peerLog.Infof("peerIDKey(%x) loading ChannelPoint(%v)", p.PubKey(), chanPoint)
peerLog.Infof("NodeKey(%x) loading ChannelPoint(%v)", p.PubKey(), chanPoint)
// Skip adding any permanently irreconcilable channels to the
// htlcswitch.
@ -1245,7 +1245,7 @@ out:
p.activeChanMtx.Unlock()
peerLog.Infof("New channel active ChannelPoint(%v) "+
"with peerIDKey(%x)", chanPoint, p.PubKey())
"with NodeKey(%x)", chanPoint, p.PubKey())
// Next, we'll assemble a ChannelLink along with the
// necessary items it needs to function.
@ -1302,7 +1302,7 @@ out:
// local payments and also passively forward payments.
if err := p.server.htlcSwitch.AddLink(link); err != nil {
peerLog.Errorf("can't register new channel "+
"link(%v) with peerIdKey(%x)", chanPoint, p.PubKey())
"link(%v) with NodeKey(%x)", chanPoint, p.PubKey())
}
close(newChanReq.done)

View File

@ -668,7 +668,7 @@ func (r *rpcServer) DisconnectPeer(ctx context.Context,
func (r *rpcServer) OpenChannel(in *lnrpc.OpenChannelRequest,
updateStream lnrpc.Lightning_OpenChannelServer) error {
rpcsLog.Tracef("[openchannel] request to identityPub(%v) "+
rpcsLog.Tracef("[openchannel] request to NodeKey(%v) "+
"allocation(us=%v, them=%v)", in.NodePubkeyString,
in.LocalFundingAmount, in.PushSat)
@ -766,7 +766,7 @@ out:
for {
select {
case err := <-errChan:
rpcsLog.Errorf("unable to open channel to identityPub(%x): %v",
rpcsLog.Errorf("unable to open channel to NodeKey(%x): %v",
nodePubKeyBytes, err)
return err
case fundingUpdate := <-updateChan:
@ -803,7 +803,7 @@ out:
}
}
rpcsLog.Tracef("[openchannel] success identityPub(%x), ChannelPoint(%v)",
rpcsLog.Tracef("[openchannel] success NodeKey(%x), ChannelPoint(%v)",
nodePubKeyBytes, outpoint)
return nil
}
@ -815,7 +815,7 @@ out:
func (r *rpcServer) OpenChannelSync(ctx context.Context,
in *lnrpc.OpenChannelRequest) (*lnrpc.ChannelPoint, error) {
rpcsLog.Tracef("[openchannel] request to identityPub(%v) "+
rpcsLog.Tracef("[openchannel] request to NodeKey(%v) "+
"allocation(us=%v, them=%v)", in.NodePubkeyString,
in.LocalFundingAmount, in.PushSat)
@ -883,7 +883,7 @@ func (r *rpcServer) OpenChannelSync(ctx context.Context,
select {
// If an error occurs them immediately return the error to the client.
case err := <-errChan:
rpcsLog.Errorf("unable to open channel to identityPub(%x): %v",
rpcsLog.Errorf("unable to open channel to NodeKey(%x): %v",
nodepubKey, err)
return nil, err

View File

@ -1807,7 +1807,7 @@ func (s *server) OpenChannel(nodeKey *btcec.PublicKey,
s.mu.RUnlock()
if targetPeer == nil {
errChan <- fmt.Errorf("unable to find peer nodeID(%x)", pubKeyBytes)
errChan <- fmt.Errorf("unable to find peer NodeKey(%x)", pubKeyBytes)
return updateChan, errChan
}