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

Commit

Permalink
Fix deserializing reference tick
Browse files Browse the repository at this point in the history
  • Loading branch information
carllin committed May 19, 2020
1 parent 79d3e72 commit d3654a5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ledger/src/shred.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,9 @@ impl Shred {
}

pub fn reference_tick_from_data(data: &[u8]) -> u8 {
let size_of_data_shred_header = SIZE_OF_DATA_SHRED_HEADER;
let flags = data[SIZE_OF_COMMON_SHRED_HEADER + size_of_data_shred_header - size_of::<u8>()];
let flags = data[SIZE_OF_COMMON_SHRED_HEADER + SIZE_OF_DATA_SHRED_HEADER
- size_of::<u8>()
- size_of::<u16>()];
flags & SHRED_TICK_REFERENCE_MASK
}

Expand Down

0 comments on commit d3654a5

Please sign in to comment.