Validate code when scheduling uprades from registrar (#3232)

Currently, anyone can registrar a code that exceeds the code size limit
when performing the upgrade from the registrar. This PR fixes that and
adds a new test to cover this.

cc @bkchr @eskimor
This commit is contained in:
Sergej Sakac
2024-02-14 18:00:03 +01:00
committed by GitHub
parent 7ec692d11c
commit 7e7c488ba8
11 changed files with 146 additions and 61 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ pub fn dummy_candidate_descriptor<H: AsRef<[u8]>>(relay_parent: H) -> CandidateD
/// Create meaningless validation code.
pub fn dummy_validation_code() -> ValidationCode {
ValidationCode(vec![1, 2, 3])
ValidationCode(vec![1, 2, 3, 4, 5, 6, 7, 8, 9])
}
/// Create meaningless head data.