ipfs-chromium
Loading...
Searching...
No Matches
dag_headers.h
1#ifndef IPFS_CHROMIUM_DAG_HEADERS_H
2#define IPFS_CHROMIUM_DAG_HEADERS_H
3
4#include <ipfs_client/ipld/block_source.h>
5
6#include <map>
7#include <string>
8#include <vector>
9
10namespace ipfs::ipld {
14 public:
15 void Add(BlockSource const&);
16 void Finish();
17
20 using HeaderList = std::vector<std::pair<std::string, std::string>>;
21
22 HeaderList const& headers() const { return headers_; }
23
24 private:
25 std::map<BlockSource::Category, short> individual_counts_;
26 HeaderList headers_;
27 std::size_t other_count_ = {};
28 BlockSource::Clock::duration other_sum_ = std::chrono::milliseconds(0);
29};
30} // namespace ipfs::ipld
31
32#endif // IPFS_CHROMIUM_DAG_HEADERS_H
Definition dag_headers.h:13
std::vector< std::pair< std::string, std::string > > HeaderList
Definition dag_headers.h:20
Definition block_source.h:12