adding frontier_req to_string() (#3986)
* adding frontier_req::to_string() Co-authored-by: Dimitrios Siganos <dimitris@siganos.org>
This commit is contained in:
parent
1f0f7db665
commit
ee0ff54db1
2 changed files with 10 additions and 0 deletions
|
|
@ -1065,6 +1065,15 @@ bool nano::frontier_req::operator== (nano::frontier_req const & other_a) const
|
|||
return start == other_a.start && age == other_a.age && count == other_a.count;
|
||||
}
|
||||
|
||||
std::string nano::frontier_req::to_string () const
|
||||
{
|
||||
std::string s = header.to_string ();
|
||||
s += "\nstart=" + start.to_string ();
|
||||
s += " maxage=" + std::to_string (age);
|
||||
s += " count=" + std::to_string (count);
|
||||
return s;
|
||||
}
|
||||
|
||||
/*
|
||||
* bulk_pull
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -227,6 +227,7 @@ public:
|
|||
uint32_t age;
|
||||
uint32_t count;
|
||||
static std::size_t constexpr size = sizeof (start) + sizeof (age) + sizeof (count);
|
||||
std::string to_string () const;
|
||||
};
|
||||
|
||||
enum class telemetry_maker : uint8_t
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue