Skip to content

Commit e0d3dc9

Browse files
Merge branch 'main' into test/404
2 parents a7ff307 + fffdcb9 commit e0d3dc9

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

.github/workflows/tests-screenshots.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,6 @@ jobs:
9292
uses: EndBug/add-and-commit@v9
9393
if: ${{ github.ref != 'refs/heads/main' }}
9494
with:
95-
add: e2e
95+
add: ./src/e2e
9696
default_author: github_actions
9797
message: "🤖 update E2E screenshots"

src/libs/storage/src/certification/impls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl CertifiedAssetHashes {
6464
let combined_proof = fallback_paths
6565
.into_iter()
6666
.fold(absence_proof, |accumulator, path| {
67-
let new_proof = self.tree_v2.witness(&[path]);
67+
let new_proof = self.tree_v2.witness(&path);
6868
merge_hash_trees(accumulator, new_proof)
6969
});
7070

src/libs/storage/src/certification/tree_utils.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::certification::constants::{
2-
EXACT_MATCH_TERMINATOR, IC_CERTIFICATE_EXPRESSION, IC_CERTIFICATE_EXPRESSION_HEADER,
3-
IC_STATUS_CODE_PSEUDO_HEADER, LABEL_HTTP_EXPR, WILDCARD_MATCH_TERMINATOR,
2+
IC_CERTIFICATE_EXPRESSION, IC_CERTIFICATE_EXPRESSION_HEADER, IC_STATUS_CODE_PSEUDO_HEADER,
3+
LABEL_HTTP_EXPR, WILDCARD_MATCH_TERMINATOR,
44
};
55
use crate::http::types::{HeaderField, StatusCode};
66
use crate::types::state::FullPath;
@@ -41,19 +41,18 @@ pub fn nested_tree_path(full_path: &str, terminator: &str) -> Vec<Blob> {
4141
segments
4242
}
4343

44-
pub fn fallback_paths(paths: Vec<Blob>) -> Vec<Blob> {
44+
pub fn fallback_paths(paths: Vec<Blob>) -> Vec<Vec<Blob>> {
4545
let mut fallback_paths = Vec::new();
4646

47-
// starting at 1 because "http_expr" is always the starting element
48-
for i in 1..paths.len() {
47+
for i in 0..paths.len() {
4948
let mut without_trailing_slash: Vec<Blob> = paths.as_slice()[0..i].to_vec();
5049
let mut with_trailing_slash = without_trailing_slash.clone();
51-
without_trailing_slash.push(EXACT_MATCH_TERMINATOR.as_bytes().to_vec());
50+
without_trailing_slash.push(WILDCARD_MATCH_TERMINATOR.as_bytes().to_vec());
5251
with_trailing_slash.push("".as_bytes().to_vec());
5352
with_trailing_slash.push(WILDCARD_MATCH_TERMINATOR.as_bytes().to_vec());
5453

55-
fallback_paths.extend(without_trailing_slash);
56-
fallback_paths.extend(with_trailing_slash);
54+
fallback_paths.push(without_trailing_slash);
55+
fallback_paths.push(with_trailing_slash);
5756
}
5857

5958
fallback_paths

0 commit comments

Comments
 (0)