Withdraw authority no longer implies a custodian (#11302)
* Withdraw authority no longer implies a custodian Before this change, if the withdraw authority and custodian had the same public key, then a withdraw authority signature would imply a custodian signature and lockup would be not be enforced. After this change, the client's withdraw instruction must explictly reference a custodian account in its optional sixth account argument. Likewise, the fee-payer no longer implies either a withdraw authority or custodian. * Fix test The test was configuring the stake account with the fee-payer as the withdraw authority, but then passing in a different key to the withdraw instruction's withdraw authority parameter. It only worked because the second transaction was signed by the fee-payer.
This commit is contained in:
@ -452,7 +452,7 @@ mod test {
|
||||
let instructions = stake_instruction::create_account(
|
||||
&payer.pubkey(),
|
||||
&stake3_keypair.pubkey(),
|
||||
&Authorized::auto(&payer.pubkey()),
|
||||
&Authorized::auto(&stake3_keypair.pubkey()),
|
||||
&Lockup::default(),
|
||||
one_sol,
|
||||
);
|
||||
|
Reference in New Issue
Block a user