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

Add retries to get blockhash for compression actions #86

Merged
merged 1 commit into from
Oct 12, 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
8 changes: 6 additions & 2 deletions consumer/src/solana.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@
true,
None,
None,
Some(mpl_token_metadata::state::CollectionDetails::V1 { size: 0 }),

Check warning on line 432 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 432 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 Expand Up @@ -1011,10 +1011,12 @@
.data(),
}];

let blockhash = with_retry!(self.0.rpc_client.get_latest_blockhash()).await?;

let serialized_message = solana_program::message::Message::new_with_blockhash(
&instructions,
Some(&payer),
&self.0.rpc_client.get_latest_blockhash().await?,
&blockhash,
)
.serialize();

Expand Down Expand Up @@ -1123,10 +1125,12 @@
.data(),
}];

let blockhash = with_retry!(self.0.rpc_client.get_latest_blockhash()).await?;

let serialized_message = solana_program::message::Message::new_with_blockhash(
&instructions,
Some(&payer),
&self.0.rpc_client.get_latest_blockhash().await?,
&blockhash,
)
.serialize();

Expand Down
Loading