Skip to content
Merged

Style. #1042

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions include/bitcoin/node/impl/chasers/chaser_organize.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void CLASS::do_organize(typename Block::cptr block,
return;
}

const auto it = tree_.find(hash_cref(hash));
const auto it = tree_.find(hash);
if (it != tree_.end())
{
handler(error_duplicate(), it->second->get_state()->height());
Expand Down Expand Up @@ -518,7 +518,7 @@ code CLASS::push_block(const Block& block,
TEMPLATE
code CLASS::push_block(const system::hash_digest& key) NOEXCEPT
{
const auto handle = tree_.extract(system::hash_cref(key));
const auto handle = tree_.extract(key);
if (!handle)
return error::organize15;

Expand All @@ -534,7 +534,7 @@ void CLASS::cache(const typename Block::cptr& block,
block->set_state(state);

// TODO: guard cache against memory exhaustion (DoS).
tree_.emplace(system::hash_cref(block->get_hash()), block);
tree_.emplace(block->get_hash(), block);
}

// Private getters
Expand All @@ -553,7 +553,7 @@ CLASS::chain_state::cptr CLASS::get_chain_state(
return state_;

// Previous block may be cached because it is not yet strong.
const auto it = tree_.find(hash_cref(previous_hash));
const auto it = tree_.find(previous_hash);
if (it != tree_.end())
return it->second->get_state();

Expand Down Expand Up @@ -583,7 +583,7 @@ bool CLASS::get_branch_work(uint256_t& work,
work += head.proof();

// Iterate.
previous = hash_cref(head.previous_block_hash());
previous = { head.previous_block_hash() };
it = tree_.find(previous);
}

Expand Down
2 changes: 1 addition & 1 deletion src/chasers/chaser_header.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ bool chaser_header::update_milestone(const system::chain::header& header,

// Iterate.
const auto& next = get_header(*it->second);
previous = hash_cref(next.previous_block_hash());
previous = { next.previous_block_hash() };
}

// The current active milestone is necessarily on the candidate branch.
Expand Down
Loading