Allow untrimming headers when needed

This commit is contained in:
Pablo Greco 2023-09-29 12:04:59 -07:00 committed by James Dorfman
parent 4259278ff5
commit c28c5ce619
5 changed files with 40 additions and 0 deletions

View file

@ -26,6 +26,8 @@
// ELEMENTS
//
#include <validation.h>
namespace {
static secp256k1_context* secp256k1_ctx_validation;
@ -487,6 +489,7 @@ std::vector<std::pair<CScript, CScript>> GetValidFedpegScripts(const CBlockIndex
break;
}
ForceUntrimHeader(p_epoch_start);
if (!p_epoch_start->dynafed_params().IsNull()) {
fedpegscripts.push_back(std::make_pair(p_epoch_start->dynafed_params().m_current.m_fedpeg_program, p_epoch_start->dynafed_params().m_current.m_fedpegscript));
} else {