Skip to content

Commit

Permalink
fix(cli): get finalized block hash (#543)
Browse files Browse the repository at this point in the history
  • Loading branch information
keyvankhademi authored Dec 5, 2024
1 parent 8b4ab1a commit 1952368
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion staking/cli/src/instructions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,13 @@ pub fn process_transaction(
signers: &[&dyn Signer],
) -> Result<Signature, TransactionError> {
let mut transaction = Transaction::new_with_payer(instructions, Some(&signers[0].pubkey()));
transaction.sign(signers, rpc_client.get_latest_blockhash().unwrap());
transaction.sign(
signers,
rpc_client
.get_latest_blockhash_with_commitment(CommitmentConfig::finalized())
.unwrap()
.0,
);
let transaction_signature_res = rpc_client
.send_and_confirm_transaction_with_spinner_and_config(
&transaction,
Expand Down

0 comments on commit 1952368

Please sign in to comment.