Skip to content
Merged
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
1 change: 1 addition & 0 deletions include/bitcoin/node/error.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ enum error_t : uint8_t
transaction6,
transaction7,
transaction8,
transaction9,
estimates_initialize,
estimates_push1,
estimates_push2,
Expand Down
6 changes: 3 additions & 3 deletions src/chasers/chaser_check.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,10 +531,10 @@ size_t chaser_check::set_unassociated() NOEXCEPT
const auto timeout = node_settings().compact_timeout();
if (!is_zero(timeout.count()) && is_current_chain(false))
{
const auto top = query.get_top_candidate();
const auto link = query.to_candidate(top);
size_t top{};
const auto link = query.to_top_candidate();
if (link != expired_ && query.is_compact(link) &&
!query.is_associated(link))
!query.is_associated(link) && query.get_height(top, link))
{
stop = std::min(stop, sub1(top));
if (link != deferred_)
Expand Down
15 changes: 11 additions & 4 deletions src/chasers/chaser_transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,16 @@ void chaser_transaction::do_bump() NOEXCEPT
auto& query = archive();
if (network_settings().enable_relay)
{
const auto top = query.get_top_confirmed();
size_t height{};
const auto top = query.to_top_confirmed();
if (!query.get_height(height, top))
{
fault(error::transaction9);
return;
}

const auto state = query.get_confirmed_chain_state(system_settings(),
query.to_confirmed(top), top);
top, height);

if (!state)
{
Expand All @@ -135,7 +142,7 @@ void chaser_transaction::do_bump() NOEXCEPT

// A complete map reaches genesis, and keeps up with the top until latched.
// Rows of a block archived before the latch may precede mapped starts.
const auto top = query.to_confirmed(query.get_top_confirmed());
const auto top = query.to_top_confirmed();
const auto unmapped = query.get_scan_start(top).is_terminal();
if (query.get_scan_start(query.to_confirmed(zero)).is_terminal())
start_scan(true);
Expand All @@ -153,7 +160,7 @@ void chaser_transaction::start_scan(bool remap) NOEXCEPT
const auto& query = archive();
const auto bound = query.is_pooling() ? query.get_scan_frontier() :
max_size_t;
const auto top = query.to_confirmed(query.get_top_confirmed());
const auto top = query.to_top_confirmed();
boost::asio::post(scan_threadpool_.service(),
BIND(do_scan, top, bound, remap));
}
Expand Down
1 change: 1 addition & 0 deletions src/error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ DEFINE_ERROR_T_MESSAGE_MAP(error)
{ transaction6, "transaction6" },
{ transaction7, "transaction7" },
{ transaction8, "transaction8" },
{ transaction9, "transaction9" },
{ estimates_initialize, "estimates_initialize" },
{ estimates_push1, "estimates_push1" },
{ estimates_push2, "estimates_push2" },
Expand Down
Loading