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
14 changes: 12 additions & 2 deletions include/bitcoin/database/impl/query/batch/prevalid.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,25 @@ bool CLASS::purge_prevalids() NOEXCEPT
// ========================================================================
}

TEMPLATE
bool CLASS::set_prevalid(const header_link& link) NOEXCEPT
{
// ========================================================================
const auto scope = get_transactor();

// Clean single allocation failure (e.g. disk full).
return store_.prevalid.put(table::prevalid::record{ {}, link });
// ========================================================================
}

TEMPLATE
bool CLASS::set_prevalids(const header_links& links) NOEXCEPT
{
// ========================================================================
const auto scope = get_transactor();

// Clean single allocation failure (e.g. disk full).
const table::prevalid::put_refs prevalids{ {}, links };
return store_.prevalid.put(prevalids);
return store_.prevalid.put(table::prevalid::put_refs{ {}, links });
// ========================================================================
}

Expand Down
1 change: 1 addition & 0 deletions include/bitcoin/database/query.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,7 @@ class query

/// Cache all prevalids.
header_links get_prevalids() const NOEXCEPT;
bool set_prevalid(const header_link& link) NOEXCEPT;
bool set_prevalids(const header_links& links) NOEXCEPT;

/// Confirmation.
Expand Down
Loading