diff --git a/include/bitcoin/database/impl/query/batch/prevalid.ipp b/include/bitcoin/database/impl/query/batch/prevalid.ipp index 20683656a..f2c3097d2 100644 --- a/include/bitcoin/database/impl/query/batch/prevalid.ipp +++ b/include/bitcoin/database/impl/query/batch/prevalid.ipp @@ -54,6 +54,17 @@ 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 { @@ -61,8 +72,7 @@ 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 }); // ======================================================================== } diff --git a/include/bitcoin/database/query.hpp b/include/bitcoin/database/query.hpp index a333aeb34..3295bda40 100644 --- a/include/bitcoin/database/query.hpp +++ b/include/bitcoin/database/query.hpp @@ -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.