mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Enforce PAK checks on dynafed proposals
This commit is contained in:
parent
dce4cecdda
commit
6000752a92
3 changed files with 18 additions and 1 deletions
|
|
@ -3524,6 +3524,16 @@ static bool ContextualCheckDynaFedHeader(const CBlockHeader& block, CValidationS
|
|||
return state.Invalid(false, REJECT_INVALID, "invalid-dyna-fed", "Proposed fedpegscript starts with OP_DEPTH, which is illegal");
|
||||
}
|
||||
}
|
||||
|
||||
// When enforcing PAK, extension_space must give non-empty PAK list when
|
||||
// the vector itself is non-empty. Otherwise this means there were "junk"
|
||||
// entries
|
||||
if (params.GetEnforcePak()) {
|
||||
if (!proposed.m_extension_space.empty() &&
|
||||
CreatePAKListFromExtensionSpace(proposed.m_extension_space).IsReject()) {
|
||||
return state.Invalid(false, REJECT_INVALID, "invalid-dyna-fed", "Extension space is not list of valid PAK entries");
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue