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

Commit 3837ea5

Browse files
committed
mv size-of nonce
1 parent a7b8290 commit 3837ea5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ledger/src/shred.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ mod stats;
8282
mod traits;
8383

8484
pub type Nonce = u32;
85+
const_assert_eq!(SIZE_OF_NONCE, 4);
86+
pub const SIZE_OF_NONCE: usize = std::mem::size_of::<Nonce>();
8587

8688
/// The following constants are computed by hand, and hardcoded.
8789
/// `test_shred_constants` ensures that the values are correct.
@@ -93,7 +95,6 @@ const SIZE_OF_SIGNATURE: usize = 64;
9395
const SIZE_OF_SHRED_TYPE: usize = 1;
9496
const SIZE_OF_SHRED_SLOT: usize = 8;
9597
const SIZE_OF_SHRED_INDEX: usize = 4;
96-
pub const SIZE_OF_NONCE: usize = 4;
9798
const_assert_eq!(SIZE_OF_CODING_SHRED_HEADERS, 89);
9899
const SIZE_OF_CODING_SHRED_HEADERS: usize =
99100
SIZE_OF_COMMON_SHRED_HEADER + SIZE_OF_CODING_SHRED_HEADER;

0 commit comments

Comments
 (0)