Add warning log when saving a peer with false status

This commit is contained in:
bcmmbaga 2024-07-25 20:11:34 +03:00
parent b7da43a91a
commit 50642f5ef3
No known key found for this signature in database
GPG Key ID: 7249A19D20613553

View File

@ -275,11 +275,9 @@ func (s *SqlStore) SavePeerStatus(accountID, peerID string, peerStatus nbpeer.Pe
var peerCopy nbpeer.Peer
peerCopy.Status = &peerStatus
if !peerCopy.Status.Connected {
log.WithContext(context.Background()).Tracef("saving an peer: %s with false status. PeerCopy %v, Arg: %v, Trace: %v",
peerID, peerCopy.Status.Connected, peerStatus.Connected,
debug.Stack())
}
log.WithContext(context.Background()).Tracef("saving an peer: %s with false status. PeerCopy %v, Arg: %v, Trace: %v",
peerID, peerCopy.Status.Connected, peerStatus.Connected,
debug.Stack())
fieldsToUpdate := []string{
"peer_status_last_seen", "peer_status_connected",