Skip to content

Commit 5112ce8

Browse files
committed
Organizer set_reorganized no longer requires link parameter.
1 parent 044c836 commit 5112ce8

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

include/bitcoin/node/chasers/chaser_organize.hpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,7 @@ class chaser_organize
139139
// Setters
140140
// ----------------------------------------------------------------------------
141141

142-
bool set_reorganized(const database::header_link& link,
143-
height_t candidate_height) NOEXCEPT;
142+
bool set_reorganized(height_t candidate_height) NOEXCEPT;
144143
bool set_organized(const database::header_link& link,
145144
height_t candidate_height) NOEXCEPT;
146145

include/bitcoin/node/impl/chasers/chaser_organize.ipp

+3-5
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ void CLASS::do_organize(typename Block::cptr block,
121121
// shared_ptr copy keeps block ref in scope until completion of set_code.
122122
const auto& hash = block->get_hash();
123123
const auto& header = get_header(*block);
124-
const auto& query = archive();
125124

126125
// Skip existing/orphan, get state.
127126
// ........................................................................
@@ -238,7 +237,7 @@ void CLASS::do_organize(typename Block::cptr block,
238237
auto index = top_candidate;
239238
while (index > branch_point)
240239
{
241-
if (!set_reorganized(query.to_candidate(index), index--))
240+
if (!set_reorganized(index--))
242241
{
243242
handler(fault(error::organize5), height);
244243
return;
@@ -380,7 +379,7 @@ void CLASS::do_disorganize(header_t link) NOEXCEPT
380379
const auto top_candidate = state_->height();
381380
for (auto index = top_candidate; index > fork_point; --index)
382381
{
383-
if (!set_reorganized(query.to_candidate(index), index))
382+
if (!set_reorganized(index))
384383
{
385384
fault(error::organize11);
386385
return;
@@ -425,8 +424,7 @@ void CLASS::do_disorganize(header_t link) NOEXCEPT
425424
// ----------------------------------------------------------------------------
426425

427426
TEMPLATE
428-
bool CLASS::set_reorganized(const database::header_link& link,
429-
height_t candidate_height) NOEXCEPT
427+
bool CLASS::set_reorganized(height_t candidate_height) NOEXCEPT
430428
{
431429
BC_ASSERT(stranded());
432430
BC_ASSERT(!is_under_checkpoint(candidate_height));

0 commit comments

Comments
 (0)