diff --git a/tests/daemon/fw/forwarder.t.cpp b/tests/daemon/fw/forwarder.t.cpp
index 98f767f..6fbb688 100644
--- a/tests/daemon/fw/forwarder.t.cpp
+++ b/tests/daemon/fw/forwarder.t.cpp
@@ -69,7 +69,7 @@
   BOOST_CHECK_EQUAL(forwarder.getCounters().nOutInterests, 0);
   BOOST_CHECK_EQUAL(forwarder.getCounters().nCsHits, 0);
   BOOST_CHECK_EQUAL(forwarder.getCounters().nCsMisses, 0);
-  face1->receiveInterest(*makeInterest("/A/B"), 0);
+  face1->receiveInterest(*makeInterest("/A/B"));
   this->advanceClocks(100_ms, 1_s);
   BOOST_REQUIRE_EQUAL(face2->sentInterests.size(), 1);
   BOOST_CHECK_EQUAL(face2->sentInterests[0].getName(), "/A/B");
@@ -83,7 +83,7 @@
 
   BOOST_CHECK_EQUAL(forwarder.getCounters().nInData, 0);
   BOOST_CHECK_EQUAL(forwarder.getCounters().nOutData, 0);
-  face2->receiveData(*makeData("/A/B"), 0);
+  face2->receiveData(*makeData("/A/B"));
   this->advanceClocks(100_ms, 1_s);
   BOOST_REQUIRE_EQUAL(face1->sentData.size(), 1);
   BOOST_CHECK_EQUAL(face1->sentData[0].getName(), "/A/B");
@@ -116,7 +116,7 @@
 
   BOOST_CHECK_EQUAL(forwarder.getCounters().nCsHits, 0);
   BOOST_CHECK_EQUAL(forwarder.getCounters().nCsMisses, 0);
-  face1->receiveInterest(*makeInterest("/A", true), 0);
+  face1->receiveInterest(*makeInterest("/A", true));
   this->advanceClocks(1_ms, 5_ms);
   // Interest matching ContentStore should not be forwarded
   BOOST_REQUIRE_EQUAL(face2->sentInterests.size(), 0);
@@ -145,7 +145,7 @@
 
   auto interest = makeInterest("/A");
   BOOST_CHECK_EQUAL(interest->hasNonce(), false);
-  face1->receiveInterest(*interest, 0);
+  face1->receiveInterest(*interest);
 
   // Ensure Nonce added if incoming packet did not have Nonce
   BOOST_REQUIRE_EQUAL(face2->getCounters().nOutInterests, 1);
@@ -191,7 +191,7 @@
   auto interest = makeInterest("/A/B");
   interest->setTag(make_shared<lp::NextHopFaceIdTag>(face2->getId()));
 
-  face1->receiveInterest(*interest, 0);
+  face1->receiveInterest(*interest);
   this->advanceClocks(100_ms, 1_s);
   BOOST_CHECK_EQUAL(face3->sentInterests.size(), 0);
   BOOST_REQUIRE_EQUAL(face2->sentInterests.size(), 1);
@@ -211,7 +211,7 @@
 
   // Incoming interest w/o HopLimit will not be dropped on send or receive paths
   auto interestNoHopLimit = makeInterest("/remote/abcdefgh");
-  faceIn->receiveInterest(*interestNoHopLimit, 0);
+  faceIn->receiveInterest(*interestNoHopLimit);
   this->advanceClocks(100_ms, 1_s);
   BOOST_CHECK_EQUAL(faceRemote->sentInterests.size(), 1);
   BOOST_CHECK_EQUAL(faceRemote->getCounters().nInHopLimitZero, 0);
@@ -222,7 +222,7 @@
   // Incoming interest w/ HopLimit > 1 will not be dropped on send/receive
   auto interestHopLimit2 = makeInterest("/remote/ijklmnop");
   interestHopLimit2->setHopLimit(2);
-  faceIn->receiveInterest(*interestHopLimit2, 0);
+  faceIn->receiveInterest(*interestHopLimit2);
   this->advanceClocks(100_ms, 1_s);
   BOOST_CHECK_EQUAL(faceRemote->getCounters().nOutInterests, 2);
   BOOST_CHECK_EQUAL(faceRemote->getCounters().nInHopLimitZero, 0);
@@ -234,7 +234,7 @@
   // Incoming interest w/ HopLimit == 1 will be dropped on send path if going out on remote face
   auto interestHopLimit1Remote = makeInterest("/remote/qrstuvwx");
   interestHopLimit1Remote->setHopLimit(1);
-  faceIn->receiveInterest(*interestHopLimit1Remote, 0);
+  faceIn->receiveInterest(*interestHopLimit1Remote);
   this->advanceClocks(100_ms, 1_s);
   BOOST_CHECK_EQUAL(faceRemote->getCounters().nOutInterests, 2);
   BOOST_CHECK_EQUAL(faceRemote->getCounters().nInHopLimitZero, 0);
@@ -244,7 +244,7 @@
   // Incoming interest w/ HopLimit == 1 will not be dropped on send path if going out on local face
   auto interestHopLimit1Local = makeInterest("/local/abcdefgh");
   interestHopLimit1Local->setHopLimit(1);
-  faceIn->receiveInterest(*interestHopLimit1Local, 0);
+  faceIn->receiveInterest(*interestHopLimit1Local);
   this->advanceClocks(100_ms, 1_s);
   BOOST_CHECK_EQUAL(faceLocal->getCounters().nOutInterests, 1);
   BOOST_CHECK_EQUAL(faceLocal->getCounters().nInHopLimitZero, 0);
@@ -256,7 +256,7 @@
   // Interest w/ HopLimit == 0 will be dropped on receive path
   auto interestHopLimit0 = makeInterest("/remote/yzabcdef");
   interestHopLimit0->setHopLimit(0);
-  faceIn->receiveInterest(*interestHopLimit0, 0);
+  faceIn->receiveInterest(*interestHopLimit0);
   this->advanceClocks(100_ms, 1_s);
   BOOST_CHECK_EQUAL(faceRemote->getCounters().nOutInterests, 2);
   BOOST_CHECK_EQUAL(faceIn->getCounters().nInHopLimitZero, 1);
@@ -267,7 +267,7 @@
 BOOST_AUTO_TEST_CASE(AddDefaultHopLimit)
 {
   auto face = addFace();
-  auto faceEndpoint = FaceEndpoint(*face, 0);
+  auto faceEndpoint = FaceEndpoint(*face);
   Pit& pit = forwarder.getPit();
   auto i1 = makeInterest("/A");
   auto pitA = pit.insert(*i1).first;
@@ -306,47 +306,47 @@
   // local face, /localhost: OK
   strategy.afterReceiveInterest_count = 0;
   auto i1 = makeInterest("/localhost/A1");
-  forwarder.onIncomingInterest(*i1, FaceEndpoint(*face1, 0));
+  forwarder.onIncomingInterest(*i1, FaceEndpoint(*face1));
   BOOST_CHECK_EQUAL(strategy.afterReceiveInterest_count, 1);
 
   // non-local face, /localhost: violate
   strategy.afterReceiveInterest_count = 0;
   auto i2 = makeInterest("/localhost/A2");
-  forwarder.onIncomingInterest(*i2, FaceEndpoint(*face2, 0));
+  forwarder.onIncomingInterest(*i2, FaceEndpoint(*face2));
   BOOST_CHECK_EQUAL(strategy.afterReceiveInterest_count, 0);
 
   // local face, non-/localhost: OK
   strategy.afterReceiveInterest_count = 0;
   auto i3 = makeInterest("/A3");
-  forwarder.onIncomingInterest(*i3, FaceEndpoint(*face1, 0));
+  forwarder.onIncomingInterest(*i3, FaceEndpoint(*face1));
   BOOST_CHECK_EQUAL(strategy.afterReceiveInterest_count, 1);
 
   // non-local face, non-/localhost: OK
   strategy.afterReceiveInterest_count = 0;
   auto i4 = makeInterest("/A4");
-  forwarder.onIncomingInterest(*i4, FaceEndpoint(*face2, 0));
+  forwarder.onIncomingInterest(*i4, FaceEndpoint(*face2));
   BOOST_CHECK_EQUAL(strategy.afterReceiveInterest_count, 1);
 
   BOOST_CHECK_EQUAL(forwarder.getCounters().nUnsolicitedData, 0);
 
   // local face, /localhost: OK
   auto d1 = makeData("/localhost/B1");
-  forwarder.onIncomingData(*d1, FaceEndpoint(*face1, 0));
+  forwarder.onIncomingData(*d1, FaceEndpoint(*face1));
   BOOST_CHECK_EQUAL(forwarder.getCounters().nUnsolicitedData, 1);
 
   // non-local face, /localhost: violate
   auto d2 = makeData("/localhost/B2");
-  forwarder.onIncomingData(*d2, FaceEndpoint(*face2, 0));
+  forwarder.onIncomingData(*d2, FaceEndpoint(*face2));
   BOOST_CHECK_EQUAL(forwarder.getCounters().nUnsolicitedData, 1);
 
   // local face, non-/localhost: OK
   auto d3 = makeData("/B3");
-  forwarder.onIncomingData(*d3, FaceEndpoint(*face1, 0));
+  forwarder.onIncomingData(*d3, FaceEndpoint(*face1));
   BOOST_CHECK_EQUAL(forwarder.getCounters().nUnsolicitedData, 2);
 
   // non-local face, non-/localhost: OK
   auto d4 = makeData("/B4");
-  forwarder.onIncomingData(*d4, FaceEndpoint(*face2, 0));
+  forwarder.onIncomingData(*d4, FaceEndpoint(*face2));
   BOOST_CHECK_EQUAL(forwarder.getCounters().nUnsolicitedData, 3);
 }
 
@@ -361,31 +361,31 @@
   auto interest1 = makeInterest("/A/1");
   strategyA.afterReceiveInterest_count = 0;
   strategyA.interestOutFace = face2;
-  forwarder.onIncomingInterest(*interest1, FaceEndpoint(*face1, 0));
+  forwarder.onIncomingInterest(*interest1, FaceEndpoint(*face1));
   BOOST_CHECK_EQUAL(strategyA.afterReceiveInterest_count, 1);
 
   auto interest2 = makeInterest("/B/2", true);
   strategyB.afterReceiveInterest_count = 0;
   strategyB.interestOutFace = face2;
-  forwarder.onIncomingInterest(*interest2, FaceEndpoint(*face1, 0));
+  forwarder.onIncomingInterest(*interest2, FaceEndpoint(*face1));
   BOOST_CHECK_EQUAL(strategyB.afterReceiveInterest_count, 1);
 
   this->advanceClocks(1_ms, 5_ms);
 
   auto data1 = makeData("/A/1");
   strategyA.beforeSatisfyInterest_count = 0;
-  forwarder.onIncomingData(*data1, FaceEndpoint(*face2, 0));
+  forwarder.onIncomingData(*data1, FaceEndpoint(*face2));
   BOOST_CHECK_EQUAL(strategyA.beforeSatisfyInterest_count, 1);
 
   auto data2 = makeData("/B/2/b");
   strategyB.beforeSatisfyInterest_count = 0;
-  forwarder.onIncomingData(*data2, FaceEndpoint(*face2, 0));
+  forwarder.onIncomingData(*data2, FaceEndpoint(*face2));
   BOOST_CHECK_EQUAL(strategyB.beforeSatisfyInterest_count, 1);
 
   auto interest3 = makeInterest("/A/3", false, 30_ms);
-  forwarder.onIncomingInterest(*interest3, FaceEndpoint(*face1, 0));
+  forwarder.onIncomingInterest(*interest3, FaceEndpoint(*face1));
   auto interest4 = makeInterest("/B/4", false, 5_s);
-  forwarder.onIncomingInterest(*interest4, FaceEndpoint(*face1, 0));
+  forwarder.onIncomingInterest(*interest4, FaceEndpoint(*face1));
 }
 
 BOOST_AUTO_TEST_CASE(IncomingData)
@@ -409,7 +409,7 @@
   pitC->insertOrUpdateInRecord(*face4, *interestC);
 
   auto dataD = makeData("/A/B/C/D");
-  forwarder.onIncomingData(*dataD, FaceEndpoint(*face3, 0));
+  forwarder.onIncomingData(*dataD, FaceEndpoint(*face3));
   this->advanceClocks(1_ms, 5_ms);
 
   BOOST_CHECK_EQUAL(face1->sentData.size(), 1);
@@ -477,14 +477,14 @@
   auto nack1 = makeNack(*interest1, lp::NackReason::CONGESTION);
   strategyA.afterReceiveNack_count = 0;
   strategyB.afterReceiveNack_count = 0;
-  forwarder.onIncomingNack(nack1, FaceEndpoint(*face1, 0));
+  forwarder.onIncomingNack(nack1, FaceEndpoint(*face1));
   BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 1);
   BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
 
   auto nack2 = makeNack(*interest2, lp::NackReason::CONGESTION);
   strategyA.afterReceiveNack_count = 0;
   strategyB.afterReceiveNack_count = 0;
-  forwarder.onIncomingNack(nack2, FaceEndpoint(*face1, 0));
+  forwarder.onIncomingNack(nack2, FaceEndpoint(*face1));
   BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 0);
   BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 1);
 
@@ -498,7 +498,7 @@
   auto nack3 = makeNack(*makeInterest("/yEcw5HhdM", false, std::nullopt, 243), lp::NackReason::CONGESTION);
   strategyA.afterReceiveNack_count = 0;
   strategyB.afterReceiveNack_count = 0;
-  forwarder.onIncomingNack(nack3, FaceEndpoint(*face1, 0));
+  forwarder.onIncomingNack(nack3, FaceEndpoint(*face1));
   BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 0);
   BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
 
@@ -510,7 +510,7 @@
   auto nack4a = makeNack(*interest4, lp::NackReason::CONGESTION);
   strategyA.afterReceiveNack_count = 0;
   strategyB.afterReceiveNack_count = 0;
-  forwarder.onIncomingNack(nack4a, FaceEndpoint(*face2, 0));
+  forwarder.onIncomingNack(nack4a, FaceEndpoint(*face2));
   BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 0);
   BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
 
@@ -518,7 +518,7 @@
   auto nack4b = makeNack(*makeInterest("/Etab4KpY", false, std::nullopt, 294), lp::NackReason::CONGESTION);
   strategyA.afterReceiveNack_count = 0;
   strategyB.afterReceiveNack_count = 0;
-  forwarder.onIncomingNack(nack4b, FaceEndpoint(*face1, 0));
+  forwarder.onIncomingNack(nack4b, FaceEndpoint(*face1));
   BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 0);
   BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
 
@@ -526,7 +526,7 @@
   pit4->insertOrUpdateOutRecord(*face3, *interest4);
   strategyA.afterReceiveNack_count = 0;
   strategyB.afterReceiveNack_count = 0;
-  forwarder.onIncomingNack(nack4a, FaceEndpoint(*face3, 0));
+  forwarder.onIncomingNack(nack4a, FaceEndpoint(*face3));
   BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 0);
   BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
 }
@@ -620,19 +620,19 @@
   // receive Interest on face1
   face1->sentNacks.clear();
   auto interest1a = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", false, std::nullopt, 732);
-  face1->receiveInterest(*interest1a, 0);
+  face1->receiveInterest(*interest1a);
   BOOST_CHECK(face1->sentNacks.empty());
 
   // receive Interest with duplicate Nonce on face1: legit retransmission
   face1->sentNacks.clear();
   auto interest1b = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", false, std::nullopt, 732);
-  face1->receiveInterest(*interest1b, 0);
+  face1->receiveInterest(*interest1b);
   BOOST_CHECK(face1->sentNacks.empty());
 
   // receive Interest with duplicate Nonce on face2
   face2->sentNacks.clear();
   auto interest2a = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", false, std::nullopt, 732);
-  face2->receiveInterest(*interest2a, 0);
+  face2->receiveInterest(*interest2a);
   BOOST_REQUIRE_EQUAL(face2->sentNacks.size(), 1);
   BOOST_CHECK_EQUAL(face2->sentNacks.back().getInterest().wireEncode(), interest2a->wireEncode());
   BOOST_CHECK_EQUAL(face2->sentNacks.back().getReason(), lp::NackReason::DUPLICATE);
@@ -640,13 +640,13 @@
   // receive Interest with new Nonce on face2
   face2->sentNacks.clear();
   auto interest2b = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", false, std::nullopt, 944);
-  face2->receiveInterest(*interest2b, 0);
+  face2->receiveInterest(*interest2b);
   BOOST_CHECK(face2->sentNacks.empty());
 
   // receive Interest with duplicate Nonce on face3, don't send Nack to multi-access face
   face3->sentNacks.clear();
   auto interest3a = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", false, std::nullopt, 732);
-  face3->receiveInterest(*interest3a, 0);
+  face3->receiveInterest(*interest3a);
   BOOST_CHECK(face3->sentNacks.empty());
 }
 
@@ -659,7 +659,7 @@
   face2->afterSend.connect([face1, face2] (uint32_t pktType) {
     if (pktType == tlv::Interest) {
       auto interest = make_shared<Interest>(face2->sentInterests.back());
-      getScheduler().schedule(170_ms, [face1, interest] { face1->receiveInterest(*interest, 0); });
+      getScheduler().schedule(170_ms, [face1, interest] { face1->receiveInterest(*interest); });
     }
   });
 
@@ -669,7 +669,7 @@
 
   // receive an Interest
   auto interest = makeInterest("/A/1", false, 50_ms, 82101183);
-  face1->receiveInterest(*interest, 0);
+  face1->receiveInterest(*interest);
 
   // interest should be forwarded only once, as long as Nonce is in Dead Nonce List
   BOOST_ASSERT(25_ms * 40 < forwarder.getDeadNonceList().getLifetime());
@@ -693,7 +693,7 @@
   auto& pit = forwarder.getPit();
   BOOST_CHECK_EQUAL(pit.size(), 0);
 
-  forwarder.onIncomingInterest(*interest, FaceEndpoint(*face1, 0));
+  forwarder.onIncomingInterest(*interest, FaceEndpoint(*face1));
   this->advanceClocks(100_ms, 20_s);
   BOOST_CHECK_EQUAL(pit.size(), 0);
 }
@@ -704,7 +704,7 @@
   auto data = makeData("/A");
 
   BOOST_CHECK_EQUAL(forwarder.getCounters().nUnsolicitedData, 0);
-  forwarder.onIncomingData(*data, FaceEndpoint(*face1, 0));
+  forwarder.onIncomingData(*data, FaceEndpoint(*face1));
   this->advanceClocks(1_ms, 10_ms);
   BOOST_CHECK_EQUAL(forwarder.getCounters().nUnsolicitedData, 1);
 }
