mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-27 16:05:39 +01:00
kernel: add btck_block_tree_entry_equals
BlockTreeEntry objects are often compared. By exposing an equality function, clients don't have to implement more expensive comparisons based on height and block hash.
This commit is contained in:
@@ -786,6 +786,11 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
bool operator==(const BlockTreeEntry& other) const
|
||||
{
|
||||
return btck_block_tree_entry_equals(get(), other.get()) != 0;
|
||||
}
|
||||
|
||||
std::optional<BlockTreeEntry> GetPrevious() const
|
||||
{
|
||||
auto entry{btck_block_tree_entry_get_previous(get())};
|
||||
|
||||
Reference in New Issue
Block a user