Skip to content

Commit

Permalink
add logs to solana rpc calls
Browse files Browse the repository at this point in the history
  • Loading branch information
mpwsh committed Jul 19, 2023
1 parent 52cd6b3 commit eff123b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions consumer/src/solana.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,17 @@ impl Solana {
message,
};

let signature = self.rpc().send_and_confirm_transaction(&transaction)?;

Ok(signature.to_string())
let signature = self
.rpc()
.send_and_confirm_transaction(&transaction)
.map(|s| s.to_string())
.map_err(|e| {
let msg = format!("failed to submit transaction: {e}");
error!(msg);
anyhow!(msg)
})?;

Ok(signature)
}

/// Res
Expand Down

0 comments on commit eff123b

Please sign in to comment.