Skip to content

Commit

Permalink
err log to output signature for failed get transaction call
Browse files Browse the repository at this point in the history
  • Loading branch information
imabdulbasit committed Oct 24, 2023
1 parent 8fd4fc5 commit 6208124
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions consumer/src/solana.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,11 @@ impl Solana {
.notify(|err: &ClientError, dur: Duration| {
error!("retrying error {:?} in {:?}", err, dur);
})
.await?;
.await
.map_err(|e| {
error!("failed to get transaction for signature {:?}", signature);
e
})?;

let meta = response
.transaction
Expand Down Expand Up @@ -335,11 +339,11 @@ impl Solana {
if valid_blockhash {
tokio::time::sleep(std::time::Duration::from_millis(250)).await;
continue;
} else {
let msg = format!("blockhash is invalid: {recent_blockhash}");
error!(msg);
bail!(msg)
}

let msg = format!("blockhash is invalid: {recent_blockhash}");
error!(msg);
bail!(msg)
},
Some(Err(e)) => {
let msg = format!("failed to send transaction: {e}");
Expand Down

0 comments on commit 6208124

Please sign in to comment.