Electroneum
Loading...
Searching...
No Matches
block_queue.cpp File Reference
#include <boost/uuid/uuid.hpp>
#include "gtest/gtest.h"
#include "crypto/crypto.h"
#include "cryptonote_protocol/cryptonote_protocol_defs.h"
#include "cryptonote_protocol/block_queue.h"
Include dependency graph for block_queue.cpp:

Go to the source code of this file.

Functions

 TEST (block_queue, empty)
 TEST (block_queue, add_stepwise)
 TEST (block_queue, flush_uuid)

Function Documentation

◆ TEST() [1/3]

TEST ( block_queue ,
add_stepwise  )

Definition at line 54 of file block_queue.cpp.

55{
57 bq.add_blocks(0, 200, uuid1());
59 bq.add_blocks(200, 200, uuid1());
61 bq.add_blocks(401, 200, uuid1());
63 bq.add_blocks(400, 10, uuid1());
65}
void add_blocks(uint64_t height, std::vector< cryptonote::block_complete_entry > bcel, const boost::uuids::uuid &connection_id, float rate, size_t size)
uint64_t get_max_block_height() const
#define ASSERT_EQ(val1, val2)
Definition gtest.h:1956
Here is the call graph for this function:

◆ TEST() [2/3]

TEST ( block_queue ,
empty  )

Definition at line 48 of file block_queue.cpp.

Here is the call graph for this function:

◆ TEST() [3/3]

TEST ( block_queue ,
flush_uuid  )

Definition at line 67 of file block_queue.cpp.

68{
70
71 bq.add_blocks(0, 200, uuid1());
73 bq.add_blocks(200, 200, uuid2());
75 bq.flush_spans(uuid2());
77 bq.flush_spans(uuid1());
79
80 bq.add_blocks(0, 200, uuid1());
82 bq.add_blocks(200, 200, uuid2());
84 bq.flush_spans(uuid1());
86 bq.add_blocks(0, 200, uuid1());
88}
void flush_spans(const boost::uuids::uuid &connection_id, bool all=false)
Here is the call graph for this function: