Skip to content

Commit

Permalink
specify custom start height for silent payments index
Browse files Browse the repository at this point in the history
  • Loading branch information
josibake committed Jan 31, 2024
1 parent 6603eee commit 4075484
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/index/blockfilterindex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,10 +478,15 @@ void ForEachBlockFilterIndex(std::function<void (BlockFilterIndex&)> fn)
bool InitBlockFilterIndex(std::function<std::unique_ptr<interfaces::Chain>()> make_chain, BlockFilterType filter_type,
size_t n_cache_size, bool f_memory, bool f_wipe)
{
int start_height = (
filter_type == BlockFilterType::SILENT_PAYMENTS ?
Params().GetConsensus().vDeployments[Consensus::DEPLOYMENT_TAPROOT].min_activation_height : 0
);
auto result = g_filter_indexes.emplace(std::piecewise_construct,
std::forward_as_tuple(filter_type),
std::forward_as_tuple(make_chain(), filter_type,
n_cache_size, f_memory, f_wipe));
n_cache_size, f_memory, f_wipe,
start_height));
return result.second;
}

Expand Down

0 comments on commit 4075484

Please sign in to comment.