Skip to content

Commit 4ed0b15

Browse files
committed
fix max buffer size
1 parent 1c5cad9 commit 4ed0b15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

governance/program/src/state/proposal_transaction_buffer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ impl ProposalTransactionBuffer {
9696

9797
/// Check to make validate the size of buffer of the transaction buffer
9898
pub fn invariant(&self) -> Result<(), ProgramError> {
99-
if self.final_buffer_size as usize >= MAX_BUFFER_SIZE {
99+
if self.final_buffer_size as usize > MAX_BUFFER_SIZE {
100100
msg!("Current final buffer size: {}", self.final_buffer_size);
101101
return Err(GovernanceError::FinalBufferSizeExceeded.into());
102102
}
103-
if self.buffer.len() >= MAX_BUFFER_SIZE {
103+
if self.buffer.len() > MAX_BUFFER_SIZE {
104104
msg!("Current buffer size: {}", self.buffer.len());
105105
return Err(GovernanceError::FinalBufferSizeExceeded.into());
106106
}

0 commit comments

Comments
 (0)