Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

err log to output signature for failed get transaction call #95

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions consumer/src/solana.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
nonblocking::rpc_client::RpcClient as SolanaRpcClient,
rpc_client::SerializableTransaction,
rpc_config::RpcSendTransactionConfig,
rpc_request::RpcError,

Check warning on line 33 in consumer/src/solana.rs

View workflow job for this annotation

GitHub Actions / Cargo Test

unused import: `rpc_request::RpcError`

Check warning on line 33 in consumer/src/solana.rs

View workflow job for this annotation

GitHub Actions / clippy/check/doc

unused import: `rpc_request::RpcError`
};
use solana_program::{
instruction::Instruction, program_pack::Pack, pubkey::Pubkey,
Expand Down Expand Up @@ -231,7 +231,11 @@
.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 @@
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 Expand Up @@ -455,7 +459,7 @@
true,
None,
None,
Some(mpl_token_metadata::state::CollectionDetails::V1 { size: 0 }),

Check warning on line 462 in consumer/src/solana.rs

View workflow job for this annotation

GitHub Actions / Cargo Test

use of deprecated variant `mpl_token_metadata::state::CollectionDetails::V1`: The collection size tracking feature is deprecated and will soon be removed.

Check warning on line 462 in consumer/src/solana.rs

View workflow job for this annotation

GitHub Actions / clippy/check/doc

use of deprecated variant `mpl_token_metadata::state::CollectionDetails::V1`: The collection size tracking feature is deprecated and will soon be removed.
);
let create_master_edition_ins = mpl_token_metadata::instruction::create_master_edition_v3(
mpl_token_metadata::ID,
Expand Down
Loading