We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23d4323 commit 9718d5dCopy full SHA for 9718d5d
src/clients/beacon/mod.rs
@@ -38,6 +38,12 @@ impl BeaconClient {
38
}
39
40
pub async fn get_block(&self, block_id: &BlockId) -> ClientResult<Option<Block>> {
41
+ let block_id = match block_id {
42
+ BlockId::Hash(hash) => format!("0x{:x}", hash),
43
+ BlockId::Slot(slot) => slot.to_string(),
44
+ block_id => block_id.to_string(),
45
+ };
46
+
47
let path = format!("v2/beacon/blocks/{block_id}");
48
let url = self.base_url.join(path.as_str())?;
49
0 commit comments