From e51df8d810d78b22b77b7111a826da309d6e0120 Mon Sep 17 00:00:00 2001 From: Wilmer Paulino Date: Thu, 3 Oct 2019 14:05:28 -0400 Subject: [PATCH] chainntnfs: only log confirmation notification registration once --- chainntnfs/txnotifier.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/chainntnfs/txnotifier.go b/chainntnfs/txnotifier.go index ad81aba0..becdb9b1 100644 --- a/chainntnfs/txnotifier.go +++ b/chainntnfs/txnotifier.go @@ -601,9 +601,6 @@ func (n *TxNotifier) RegisterConf(txid *chainhash.Hash, pkScript []byte, return nil, err } - Log.Infof("New confirmation subscription: %v, num_confs=%v ", - ntfn.ConfRequest, numConfs) - // Before proceeding to register the notification, we'll query our // height hint cache to determine whether a better one exists. // @@ -622,12 +619,13 @@ func (n *TxNotifier) RegisterConf(txid *chainhash.Hash, pkScript []byte, ntfn.ConfRequest, err) } + Log.Infof("New confirmation subscription: conf_id=%d, %v, "+ + "num_confs=%v height_hint=%d", ntfn.ConfID, ntfn.ConfRequest, + numConfs, startHeight) + n.Lock() defer n.Unlock() - Log.Infof("New confirmation subscription: conf_id=%d, %v, "+ - "height_hint=%d", ntfn.ConfID, ntfn.ConfRequest, startHeight) - confSet, ok := n.confNotifications[ntfn.ConfRequest] if !ok { // If this is the first registration for this request, construct