Simplify nfd-status using SegmentFetcher
The code of nfd-status can be simplified by using SegmentFetcher from the library.
Updated by Yukai Tu about 5 years ago
- Status changed from New to In Progress
- Assignee changed from Teng Liang to Yukai Tu
In SegmentFetcher, if data without finalBlockId, it will emit next Interest. In NfdStatus::fetchVersionInformation(), NfdStatus emit "/localhost/nfd/status", but statusServer doesn't have publisher, which means it can't set finalBlockId in Data, and it doesn't have second data. So it will fail to fetch "/localhost/nfd/status". Add setFinalBlockId in statusServer can solve the problem. Other fetch can be rewrited using SegmentFetcher successfully.