diff --git a/src/fragment_store/message_fragment_store.cpp b/src/fragment_store/message_fragment_store.cpp index 7797b10..61fb968 100644 --- a/src/fragment_store/message_fragment_store.cpp +++ b/src/fragment_store/message_fragment_store.cpp @@ -100,38 +100,6 @@ void MessageFragmentStore::handleMessage(const Message3Handle& m) { std::cout << "MFS: new msg missing FUID\n"; if (!m.registry()->ctx().contains()) { m.registry()->ctx().emplace(); - -#if 0 - // TODO: move this to async - // TODO: move this to tick and just respect the dirty - FragmentHandle most_recent_fag; - uint64_t most_recent_ts{0}; - if (m.registry()->ctx().contains()) { - for (const auto& [fid, si] : m.registry()->ctx().get().frags) { - auto fh = _fs.fragmentHandle(fid); - if (!static_cast(fh) || !fh.all_of()) { - // TODO: remove at this point? - continue; - } - - const uint64_t f_ts = fh.get().begin; - if (f_ts > most_recent_ts) { - // this makes no sense, we retry to load the first fragment on every new message and bail here, bc it was already - if (m.registry()->ctx().contains()) { - if (m.registry()->ctx().get().frags.contains(fh)) { - continue; // already loaded - } - } - most_recent_ts = f_ts; - most_recent_fag = {_fs._reg, fid}; - } - } - } - - if (static_cast(most_recent_fag)) { - loadFragment(*m.registry(), most_recent_fag); - } -#endif } auto& fuid_open = m.registry()->ctx().get().fuid_open;