sync: remove check-for-self in sync updates

Change-Id: Iba7e80370acc7c7144725bb6de1d018a8493b9b7
refs: #4117
diff --git a/src/communication/sync-logic-handler.cpp b/src/communication/sync-logic-handler.cpp
index 1413b39..11330b5 100644
--- a/src/communication/sync-logic-handler.cpp
+++ b/src/communication/sync-logic-handler.cpp
@@ -121,30 +121,26 @@
 {
   _LOG_DEBUG("Origin Router of update: " << originRouter);
 
-  // A router should not try to fetch its own LSA
-  if (originRouter != m_confParam.getRouterPrefix()) {
+  std::string lsaType = updateName.get(updateName.size()-1).toUri();
 
-    std::string lsaType = updateName.get(updateName.size()-1).toUri();
+  _LOG_DEBUG("Received sync update with higher " << lsaType
+             << " sequence number than entry in LSDB");
 
-    _LOG_DEBUG("Received sync update with higher " << lsaType
-               << " sequence number than entry in LSDB");
-
-    if (isLsaNew(originRouter, lsaType, seqNo)) {
-      if (lsaType == AdjLsa::TYPE_STRING && seqNo != 0 &&
-          m_confParam.getHyperbolicState() == HYPERBOLIC_STATE_ON) {
-        _LOG_ERROR("Got an update for adjacency LSA when hyperbolic routing"
-                   << " is enabled. Not going to fetch.");
-        return;
-      }
-
-      if (lsaType == CoordinateLsa::TYPE_STRING && seqNo != 0 &&
-          m_confParam.getHyperbolicState() == HYPERBOLIC_STATE_OFF) {
-        _LOG_ERROR("Got an update for coordinate LSA when link-state"
-                   << " is enabled. Not going to fetch.");
-        return;
-      }
-      expressInterestForLsa(updateName, seqNo);
+  if (isLsaNew(originRouter, lsaType, seqNo)) {
+    if (lsaType == AdjLsa::TYPE_STRING && seqNo != 0 &&
+        m_confParam.getHyperbolicState() == HYPERBOLIC_STATE_ON) {
+      _LOG_ERROR("Got an update for adjacency LSA when hyperbolic routing"
+                 << " is enabled. Not going to fetch.");
+      return;
     }
+
+    if (lsaType == CoordinateLsa::TYPE_STRING && seqNo != 0 &&
+        m_confParam.getHyperbolicState() == HYPERBOLIC_STATE_OFF) {
+      _LOG_ERROR("Got an update for coordinate LSA when link-state"
+                 << " is enabled. Not going to fetch.");
+      return;
+    }
+    expressInterestForLsa(updateName, seqNo);
   }
 }
 
diff --git a/tests/test-sync-logic-handler.cpp b/tests/test-sync-logic-handler.cpp
index ea23571..f41412b 100644
--- a/tests/test-sync-logic-handler.cpp
+++ b/tests/test-sync-logic-handler.cpp
@@ -168,21 +168,6 @@
   }
 }
 
-
-BOOST_AUTO_TEST_CASE(NoUpdateForSelf)
-{
-  for (const std::string& lsaType : lsaTypes) {
-    std::string updateName = nlsr.getConfParameter().getLsaPrefix().toUri() +
-                             CONFIG_SITE + CONFIG_ROUTER_NAME + lsaType;
-
-    receiveUpdate(updateName, 1, sync);
-
-    std::vector<ndn::Interest>& interests = face->sentInterests;
-    BOOST_CHECK_EQUAL(interests.size(), 0);
-  }
-}
-
-
 BOOST_AUTO_TEST_CASE(MalformedUpdate)
 {
   for (const std::string& lsaType : lsaTypes) {