rs client: Use finalized commitment for blockhash

confirmed say occasional errors
This commit is contained in:
Christian Kamm 2023-12-11 10:30:59 +01:00
parent 7722c66826
commit add1647d37
1 changed files with 1 additions and 1 deletions

View File

@ -1722,7 +1722,7 @@ impl TransactionBuilder {
rpc: &RpcClientAsync, rpc: &RpcClientAsync,
) -> anyhow::Result<solana_sdk::transaction::VersionedTransaction> { ) -> anyhow::Result<solana_sdk::transaction::VersionedTransaction> {
let (latest_blockhash, _) = rpc let (latest_blockhash, _) = rpc
.get_latest_blockhash_with_commitment(CommitmentConfig::confirmed()) .get_latest_blockhash_with_commitment(CommitmentConfig::finalized())
.await?; .await?;
self.transaction_with_blockhash(latest_blockhash) self.transaction_with_blockhash(latest_blockhash)
} }