Skip to content

Commit

Permalink
fix: Solana get_block transaction version (#5424)
Browse files Browse the repository at this point in the history
* chore: use get_block with transaction version 0

* chore: add missing option
  • Loading branch information
albert-llimos authored Nov 18, 2024
1 parent 238c90b commit fdf208b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion engine/src/witness/sol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,17 @@ impl VoterApi<SolanaLiveness> for SolanaLivenessVoter {
slot: <SolanaLiveness as ElectoralSystem>::ElectionProperties,
) -> Result<<<SolanaLiveness as ElectoralSystem>::Vote as VoteStorage>::Vote, anyhow::Error> {
Ok(SolHash::from_str(
&self.client.get_block(slot, RpcBlockConfig::default()).await.blockhash,
&self
.client
.get_block(
slot,
RpcBlockConfig {
max_supported_transaction_version: Some(0),
..Default::default()
},
)
.await
.blockhash,
)
.map_err(|e| anyhow::anyhow!("Failed to convert blockhash String to SolHash: {e}"))?)
}
Expand Down

0 comments on commit fdf208b

Please sign in to comment.