Skip to content

Commit

Permalink
fix alignment in remaining_bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington committed Nov 18, 2023
1 parent 557af32 commit e286058
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion accounts-db/src/append_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@ impl AppendVec {

/// how many more bytes can be stored in this append vec
pub fn remaining_bytes(&self) -> u64 {
(self.capacity()).saturating_sub(self.len() as u64)
// all writes will start at next u64 aligned len, so maybe this is the right place
(self.capacity()).saturating_sub(u64_align!(self.len()) as u64)
}

pub fn len(&self) -> usize {
Expand Down

0 comments on commit e286058

Please sign in to comment.