Add pubkey consistency check on account and proof data (#3767)
This commit is contained in:
parent
7a2702936d
commit
d6a72ebfe4
|
@ -252,6 +252,10 @@ fn process_empty_account(
|
||||||
return Err(ProgramError::InvalidInstructionData);
|
return Err(ProgramError::InvalidInstructionData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if confidential_transfer_account.encryption_pubkey != proof_data.pubkey {
|
||||||
|
return Err(TokenError::ConfidentialTransferElGamalPubkeyMismatch.into());
|
||||||
|
}
|
||||||
|
|
||||||
confidential_transfer_account.available_balance = EncryptedBalance::zeroed();
|
confidential_transfer_account.available_balance = EncryptedBalance::zeroed();
|
||||||
confidential_transfer_account.closable()?;
|
confidential_transfer_account.closable()?;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue