From 589f41c634fd6c3c9028c2079b5e6f903d122d4a Mon Sep 17 00:00:00 2001 From: Manik Jain Date: Tue, 18 Nov 2025 20:11:36 +0000 Subject: [PATCH] vote: use InvalidAccountData for v0_23_5 vsv deserializing --- vote-interface/src/state/vote_state_versions.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vote-interface/src/state/vote_state_versions.rs b/vote-interface/src/state/vote_state_versions.rs index 94bd5573f..58c7f26f8 100644 --- a/vote-interface/src/state/vote_state_versions.rs +++ b/vote-interface/src/state/vote_state_versions.rs @@ -211,7 +211,7 @@ impl VoteStateVersions { let variant = solana_serialize_utils::cursor::read_u32(&mut cursor)?; match variant { // V0_23_5 not supported. - 0 => Err(InstructionError::UninitializedAccount), + 0 => Err(InstructionError::InvalidAccountData), // V1_14_11 1 => { let mut vote_state = Box::new(MaybeUninit::uninit()); @@ -272,7 +272,7 @@ mod tests { let v0_23_5 = VoteStateVersions::V0_23_5(Box::default()); assert_eq!( ser_deser(v0_23_5), - Err(InstructionError::UninitializedAccount), // <-- v0_23_5 unsupported + Err(InstructionError::InvalidAccountData), // <-- v0_23_5 unsupported ); let v1_14_11 = VoteStateVersions::V1_14_11(Box::default());