Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit 0a78282

Browse files
committed
de minimis
1 parent 3837ea5 commit 0a78282

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ledger/src/shred/legacy.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,16 @@ const SIZE_OF_ERASURE_ENCODED_SLICE: usize =
3131
// Layout: {common, data} headers | data | zero padding
3232
// Everything upto SIZE_OF_CODING_SHRED_HEADERS bytes at the end (which is part
3333
// of zero padding) is erasure coded.
34-
// All payload past signature (including all of zero padding) is signed.
34+
// All payload past signature, including the entire of zero paddings, is
35+
// signed.
3536
#[derive(Clone, Debug, PartialEq)]
3637
pub struct ShredData {
3738
common_header: ShredCommonHeader,
3839
data_header: DataShredHeader,
3940
payload: Vec<u8>,
4041
}
4142

42-
// Layout: {common, data} headers | data | erasure coded shard
43+
// Layout: {common, coding} headers | erasure coded shard
4344
// All payload past signature is singed.
4445
#[derive(Clone, Debug, PartialEq)]
4546
pub struct ShredCode {
@@ -50,7 +51,8 @@ pub struct ShredCode {
5051

5152
impl Shred for ShredData {
5253
impl_shred_common!();
53-
// Legacy data shreds always zero padded.
54+
// Legacy data shreds are always zero padded and
55+
// the same size as coding shreds.
5456
const SIZE_OF_PAYLOAD: usize = shred_code::ShredCode::SIZE_OF_PAYLOAD;
5557

5658
fn from_payload(mut payload: Vec<u8>) -> Result<Self, Error> {

0 commit comments

Comments
 (0)