Skip to content

Commit 8d5d7dd

Browse files
committed
Style, comments.
1 parent f8be414 commit 8d5d7dd

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

include/bitcoin/node/chasers/chaser_confirm.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ class BCN_API chaser_confirm
7171

7272
// getters
7373
header_links get_fork(height_t fork_top) const NOEXCEPT;
74-
bool get_fork_work(uint256_t& fork_work,
74+
bool get_work(uint256_t& fork_work,
7575
const header_links& fork) const NOEXCEPT;
76-
bool get_is_strong(bool& strong, const uint256_t& fork_work,
76+
bool get_strong(bool& strong, const uint256_t& fork_work,
7777
size_t fork_point) const NOEXCEPT;
7878
};
7979

src/chasers/chaser_confirm.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,15 @@ void chaser_confirm::do_bumped(height_t height) NOEXCEPT
165165
return;
166166

167167
uint256_t work{};
168-
if (!get_fork_work(work, fork))
168+
if (!get_work(work, fork))
169169
{
170170
fault(error::confirm1);
171171
return;
172172
}
173173

174174
bool strong{};
175175
const auto fork_point = height - fork.size();
176-
if (!get_is_strong(strong, work, fork_point))
176+
if (!get_strong(strong, work, fork_point))
177177
{
178178
fault(error::confirm2);
179179
return;
@@ -423,8 +423,8 @@ bool chaser_confirm::roll_back(const header_links& popped, size_t fork_point,
423423

424424
// Private getters
425425
// ----------------------------------------------------------------------------
426-
// These are subject to intervening/concurrent candidate chain reorganization.
427426

427+
// TODO: move into database library with internal lock.
428428
chaser_confirm::header_links chaser_confirm::get_fork(
429429
height_t fork_top) const NOEXCEPT
430430
{
@@ -452,7 +452,7 @@ chaser_confirm::header_links chaser_confirm::get_fork(
452452
return out;
453453
}
454454

455-
bool chaser_confirm::get_fork_work(uint256_t& fork_work,
455+
bool chaser_confirm::get_work(uint256_t& fork_work,
456456
const header_links& fork) const NOEXCEPT
457457
{
458458
BC_ASSERT(stranded());
@@ -472,7 +472,7 @@ bool chaser_confirm::get_fork_work(uint256_t& fork_work,
472472
}
473473

474474
// A fork with greater work will cause confirmed reorganization.
475-
bool chaser_confirm::get_is_strong(bool& strong, const uint256_t& fork_work,
475+
bool chaser_confirm::get_strong(bool& strong, const uint256_t& fork_work,
476476
size_t fork_point) const NOEXCEPT
477477
{
478478
BC_ASSERT(stranded());

0 commit comments

Comments
 (0)