Skip to content

Commit

Permalink
rpc: fix possible deadlock in rpc (#26051)
Browse files Browse the repository at this point in the history
  • Loading branch information
BurtonQin authored Jun 23, 2022
1 parent 04ce0ce commit 113b161
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpc/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1431,12 +1431,12 @@ impl JsonRpcRequestProcessor {
bank: &Arc<Bank>,
) -> Option<TransactionStatus> {
let (slot, status) = bank.get_signature_status_slot(&signature)?;
let r_block_commitment_cache = self.block_commitment_cache.read().unwrap();

let optimistically_confirmed_bank = self.bank(Some(CommitmentConfig::confirmed()));
let optimistically_confirmed =
optimistically_confirmed_bank.get_signature_status_slot(&signature);

let r_block_commitment_cache = self.block_commitment_cache.read().unwrap();
let confirmations = if r_block_commitment_cache.root() >= slot
&& is_finalized(&r_block_commitment_cache, bank, &self.blockstore, slot)
{
Expand Down

0 comments on commit 113b161

Please sign in to comment.