Skip to content

Commit 5cad991

Browse files
authored
fix storing single cell content on dhts (#127)
1 parent 7ea689d commit 5cad991

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

kate/recovery/src/data.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ impl SingleCell {
4343
pub fn proof(&self) -> [u8; 48] {
4444
self.content[..48].try_into().expect("content is 80 bytes")
4545
}
46+
47+
pub fn to_bytes(&self) -> Vec<u8> {
48+
self.content.to_vec()
49+
}
4650
}
4751

4852
#[derive(Debug, Clone, Constructor)]
@@ -247,7 +251,7 @@ impl Cell {
247251
pub fn to_bytes(&self) -> Vec<u8> {
248252
match self {
249253
Cell::MultiProofCell(mcell) => mcell.to_bytes(),
250-
Cell::SingleCell(cell) => cell.data().to_vec(),
254+
Cell::SingleCell(cell) => cell.to_bytes(),
251255
}
252256
}
253257
}

0 commit comments

Comments
 (0)