#include "gtest/gtest.h"
#include "checkpoints/checkpoints.cpp"
Go to the source code of this file.
|
| | TEST (checkpoints_is_alternative_block_allowed, handles_empty_checkpoints) |
| |
| | TEST (checkpoints_is_alternative_block_allowed, handles_one_checkpoint) |
| |
| | TEST (checkpoints_is_alternative_block_allowed, handles_two_and_more_checkpoints) |
| |
◆ TEST() [1/3]
| TEST |
( |
checkpoints_is_alternative_block_allowed |
, |
|
|
handles_empty_checkpoints |
|
|
) |
| |
Definition at line 39 of file checkpoints.cpp.
bool is_alternative_block_allowed(uint64_t blockchain_height, uint64_t block_height) const
checks if alternate chain blocks should be kept for a given height
#define ASSERT_FALSE(condition)
#define ASSERT_TRUE(condition)
A container for blockchain checkpoints.
◆ TEST() [2/3]
| TEST |
( |
checkpoints_is_alternative_block_allowed |
, |
|
|
handles_one_checkpoint |
|
|
) |
| |
Definition at line 50 of file checkpoints.cpp.
bool add_checkpoint(uint64_t height, const std::string &hash_str)
adds a checkpoint to the container
bool is_alternative_block_allowed(uint64_t blockchain_height, uint64_t block_height) const
checks if alternate chain blocks should be kept for a given height
#define ASSERT_FALSE(condition)
#define ASSERT_TRUE(condition)
A container for blockchain checkpoints.
◆ TEST() [3/3]
| TEST |
( |
checkpoints_is_alternative_block_allowed |
, |
|
|
handles_two_and_more_checkpoints |
|
|
) |
| |
Definition at line 88 of file checkpoints.cpp.
bool add_checkpoint(uint64_t height, const std::string &hash_str)
adds a checkpoint to the container
bool is_alternative_block_allowed(uint64_t blockchain_height, uint64_t block_height) const
checks if alternate chain blocks should be kept for a given height
#define ASSERT_FALSE(condition)
#define ASSERT_TRUE(condition)
A container for blockchain checkpoints.