switchboard-solana: fix discriminator check

This commit is contained in:
Conner Gallagher 2023-06-28 12:54:05 -06:00
parent 13ae2c28c8
commit 610f6a8f56
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ pub async fn load_account<T: bytemuck::Pod + Discriminator + Owner>(
let mut disc_bytes = [0u8; 8]; let mut disc_bytes = [0u8; 8];
disc_bytes.copy_from_slice(&data[..8]); disc_bytes.copy_from_slice(&data[..8]);
if disc_bytes != AggregatorAccountData::discriminator() { if disc_bytes != T::discriminator() {
return Err(SwitchboardClientError::CustomMessage( return Err(SwitchboardClientError::CustomMessage(
"Discriminator error, check the account type".to_string(), "Discriminator error, check the account type".to_string(),
)); ));