diff --git a/include/bitcoin/database/impl/store/store_prune.ipp b/include/bitcoin/database/impl/store/store_prune.ipp index 7f0406b4e..779ff63b4 100644 --- a/include/bitcoin/database/impl/store/store_prune.ipp +++ b/include/bitcoin/database/impl/store/store_prune.ipp @@ -72,6 +72,10 @@ code CLASS::prune(const event_handler& handler) NOEXCEPT else { // Reclaim disk space to logical extent. + handler(event_t::unload_file, table_t::prevout_body); + if (!ec) ec = prevout_body_.shrink(); + handler(event_t::load_file, table_t::prevout_body); + handler(event_t::unload_file, table_t::ecdsa_body); if (!ec) ec = ecdsa_body_.shrink(); handler(event_t::load_file, table_t::ecdsa_body); @@ -79,10 +83,6 @@ code CLASS::prune(const event_handler& handler) NOEXCEPT handler(event_t::unload_file, table_t::schnorr_body); if (!ec) ec = schnorr_body_.shrink(); handler(event_t::load_file, table_t::schnorr_body); - - handler(event_t::unload_file, table_t::schnorr_body); - if (!ec) ec = prevout_body_.shrink(); - handler(event_t::load_file, table_t::schnorr_body); } } }