Skip to content

Commit 589f41c

Browse files
committed
vote: use InvalidAccountData for v0_23_5 vsv deserializing
1 parent e9de9d8 commit 589f41c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vote-interface/src/state/vote_state_versions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ impl VoteStateVersions {
211211
let variant = solana_serialize_utils::cursor::read_u32(&mut cursor)?;
212212
match variant {
213213
// V0_23_5 not supported.
214-
0 => Err(InstructionError::UninitializedAccount),
214+
0 => Err(InstructionError::InvalidAccountData),
215215
// V1_14_11
216216
1 => {
217217
let mut vote_state = Box::new(MaybeUninit::uninit());
@@ -272,7 +272,7 @@ mod tests {
272272
let v0_23_5 = VoteStateVersions::V0_23_5(Box::default());
273273
assert_eq!(
274274
ser_deser(v0_23_5),
275-
Err(InstructionError::UninitializedAccount), // <-- v0_23_5 unsupported
275+
Err(InstructionError::InvalidAccountData), // <-- v0_23_5 unsupported
276276
);
277277

278278
let v1_14_11 = VoteStateVersions::V1_14_11(Box::default());

0 commit comments

Comments
 (0)