spl: Fix governance try_deserialize_unchecked to not check discriminator (#1105)

This commit is contained in:
Christian Kamm 2021-12-07 21:24:21 +01:00 committed by GitHub
parent 0f8de4f6af
commit 512bb95808
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 3 deletions

View File

@ -25,9 +25,6 @@ macro_rules! vote_weight_record {
let vwr: spl_governance::addins::voter_weight::VoterWeightRecord =
anchor_lang::AnchorDeserialize::deserialize(&mut data)
.map_err(|_| anchor_lang::__private::ErrorCode::AccountDidNotDeserialize)?;
if vwr.account_type != spl_governance::addins::voter_weight::VoterWeightAccountType::Uninitialized {
return Err(anchor_lang::__private::ErrorCode::AccountDidNotSerialize.into());
}
Ok(VoterWeightRecord(vwr))
}
}