Add missing derivation checks
Change-Id: I615c5fc4fd737cdeb9bb4a118cdbfb8ef7abc5db
This commit is contained in:
parent
5afe6732f9
commit
2bfdc2fdc9
|
@ -136,6 +136,18 @@ pub fn upgrade_guardian_set(
|
|||
_data: UpgradeGuardianSetData,
|
||||
) -> Result<()> {
|
||||
verify_claim(&accs.vaa)?;
|
||||
accs.guardian_set_old.verify_derivation(
|
||||
ctx.program_id,
|
||||
&GuardianSetDerivationData {
|
||||
index: accs.vaa.new_guardian_set_index - 1,
|
||||
},
|
||||
)?;
|
||||
accs.guardian_set_new.verify_derivation(
|
||||
ctx.program_id,
|
||||
&GuardianSetDerivationData {
|
||||
index: accs.vaa.new_guardian_set_index,
|
||||
},
|
||||
)?;
|
||||
|
||||
accs.vaa.claim(ctx, accs.payer.key)?;
|
||||
|
||||
|
|
Loading…
Reference in New Issue