Skip to content

Commit

Permalink
Add safety check to crank builder when fetching queues
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Garfield committed Oct 11, 2022
1 parent 65b8f53 commit 23f3bc6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugin/src/builders/queue_crank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ fn build_crank_tx(
worker_id: u64,
) -> Option<Transaction> {
// Build the first crank ix
let queue = client.get::<Queue>(&queue_pubkey).unwrap();
let queue = match client.get::<Queue>(&queue_pubkey) {
Err(_err) => return None,
Ok(queue) => queue,
};
let blockhash = client.get_latest_blockhash().unwrap();
let signatory_pubkey = client.payer_pubkey();

Expand Down

0 comments on commit 23f3bc6

Please sign in to comment.