chunks+peek: stop using deprecated {get,set}FinalBlockId

Change-Id: I64ae1c33a6f83af34b3db3d5f48cee3f3e7b7cb1
Refs: #4526
diff --git a/tools/chunks/catchunks/pipeline-interests-aimd.cpp b/tools/chunks/catchunks/pipeline-interests-aimd.cpp
index cdf502d..eac9dfd 100644
--- a/tools/chunks/catchunks/pipeline-interests-aimd.cpp
+++ b/tools/chunks/catchunks/pipeline-interests-aimd.cpp
@@ -215,8 +215,8 @@
   // Data name will not have extra components because MaxSuffixComponents is set to 1
   BOOST_ASSERT(data.getName().equals(interest.getName()));
 
-  if (!m_hasFinalBlockId && !data.getFinalBlockId().empty()) {
-    m_lastSegmentNo = data.getFinalBlockId().toSegment();
+  if (!m_hasFinalBlockId && data.getFinalBlock()) {
+    m_lastSegmentNo = data.getFinalBlock()->toSegment();
     m_hasFinalBlockId = true;
     cancelInFlightSegmentsGreaterThan(m_lastSegmentNo);
     if (m_hasFailure && m_lastSegmentNo >= m_failedSegNo) {
diff --git a/tools/chunks/catchunks/pipeline-interests-fixed-window.cpp b/tools/chunks/catchunks/pipeline-interests-fixed-window.cpp
index 69f9dc9..53178ee 100644
--- a/tools/chunks/catchunks/pipeline-interests-fixed-window.cpp
+++ b/tools/chunks/catchunks/pipeline-interests-fixed-window.cpp
@@ -121,8 +121,8 @@
 
   onData(data);
 
-  if (!m_hasFinalBlockId && !data.getFinalBlockId().empty()) {
-    m_lastSegmentNo = data.getFinalBlockId().toSegment();
+  if (!m_hasFinalBlockId && data.getFinalBlock()) {
+    m_lastSegmentNo = data.getFinalBlock()->toSegment();
     m_hasFinalBlockId = true;
 
     for (auto& fetcher : m_segmentFetchers) {
diff --git a/tools/chunks/catchunks/pipeline-interests.cpp b/tools/chunks/catchunks/pipeline-interests.cpp
index e520bfe..68e0157 100644
--- a/tools/chunks/catchunks/pipeline-interests.cpp
+++ b/tools/chunks/catchunks/pipeline-interests.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2016-2017, Regents of the University of California,
+ * Copyright (c) 2016-2018, Regents of the University of California,
  *                          Colorado State University,
  *                          University Pierre & Marie Curie, Sorbonne University.
  *
@@ -56,8 +56,8 @@
   m_prefix = data.getName().getPrefix(-1);
   m_excludedSegmentNo = getSegmentFromPacket(data);
 
-  if (!data.getFinalBlockId().empty()) {
-    m_lastSegmentNo = data.getFinalBlockId().toSegment();
+  if (data.getFinalBlock()) {
+    m_lastSegmentNo = data.getFinalBlock()->toSegment();
     m_hasFinalBlockId = true;
   }
 
diff --git a/tools/chunks/putchunks/producer.cpp b/tools/chunks/putchunks/producer.cpp
index 3fb14c7..4483558 100644
--- a/tools/chunks/putchunks/producer.cpp
+++ b/tools/chunks/putchunks/producer.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2016-2017, Regents of the University of California,
+ * Copyright (c) 2016-2018, Regents of the University of California,
  *                          Colorado State University,
  *                          University Pierre & Marie Curie, Sorbonne University.
  *
@@ -129,7 +129,7 @@
 
   auto finalBlockId = name::Component::fromSegment(m_store.size() - 1);
   for (const auto& data : m_store) {
-    data->setFinalBlockId(finalBlockId);
+    data->setFinalBlock(finalBlockId);
     m_keyChain.sign(*data, m_options.signingInfo);
   }