Skip to content

Commit 5c6a7b4

Browse files
committed
Use diamond/data as the bundle prefix
1 parent eed6885 commit 5c6a7b4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

bundler/src/bundle.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ where
5050
sessions: Sessions,
5151
}
5252

53+
const BUNDLE_PREFIX: &str = "diamond/data";
54+
5355
impl<Metadata> Bundle<Metadata>
5456
where
5557
Metadata: Hash + Serialize,
@@ -64,7 +66,7 @@ where
6466
Self {
6567
manifest: Manifest {
6668
revision: format!("{}:{}", crate::built_info::PKG_VERSION, hash),
67-
roots: vec!["diamond".to_string()],
69+
roots: vec![BUNDLE_PREFIX.to_string()],
6870
wasm: vec![],
6971
metadata,
7072
},
@@ -94,15 +96,15 @@ where
9496
let mut proposals_header = Header::from_bytes(&proposals);
9597
bundle_builder.append_data(
9698
&mut proposals_header,
97-
"diamond/users/proposals/data.json",
99+
format!("{BUNDLE_PREFIX}/users/proposals/data.json"),
98100
proposals.as_slice(),
99101
)?;
100102

101103
let sessions = serde_json::to_vec(&self.sessions)?;
102104
let mut sessions_header = Header::from_bytes(&sessions);
103105
bundle_builder.append_data(
104106
&mut sessions_header,
105-
"diamond/users/sessions/data.json",
107+
format!("{BUNDLE_PREFIX}/users/sessions/data.json"),
106108
sessions.as_slice(),
107109
)?;
108110

0 commit comments

Comments
 (0)