Просмотр исходного кода

fix(cli): use authority_signer instead of hardcoded config.signers[1] in migrate_program (#9075)

Fixes index out of bounds panic when running 'solana program migrate' without the --authority flag. The code was hardcoding config.signers[1] instead of using the pre-computed authority_signer_index.

Signed-off-by: AvhiMaz <avhimazumder5@outlook.com>
Co-authored-by: Arjun Mundamani <arjunmundamani@gmail.com>
Avhi 3 дней назад
Родитель
Сommit
c260d1dafb
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      cli/src/program.rs

+ 1 - 1
cli/src/program.rs

@@ -2564,7 +2564,7 @@ fn process_migrate_program(
     simulate_and_update_compute_unit_limit(&ComputeUnitLimit::Simulated, rpc_client, &mut message)?;
 
     let mut tx = Transaction::new_unsigned(message);
-    tx.try_sign(&[config.signers[0], config.signers[1]], blockhash)?;
+    tx.try_sign(&[config.signers[0], authority_signer], blockhash)?;
     let result = rpc_client.send_and_confirm_transaction_with_spinner_and_config(
         &tx,
         config.commitment,