Skip to content

Commit

Permalink
Merge pull request #95 from holaplex/abdul/err-log
Browse files Browse the repository at this point in the history
err log to output signature for failed get transaction call
  • Loading branch information
imabdulbasit authored Oct 24, 2023
2 parents 4eb9235 + 6208124 commit c2c4ba6
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 c2c4ba6

Please sign in to comment.