File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ pub mod query {
181181 ///
182182 /// Hashes must be 32 bytes, hex-encoded, and prefixed with "0x".
183183 #[ arg( value_name = "BLOCK_REF" ) ]
184- pub block_ref : BlockRef ,
184+ pub block_ref : Option < BlockRef > ,
185185
186186 /// By default, if the block is not available (e.g. not yet produced), the shim will return immediately.
187187 ///
Original file line number Diff line number Diff line change @@ -23,9 +23,9 @@ pub async fn get_block_at(
2323 block : BlockParams ,
2424) -> anyhow:: Result < ikura_rpc:: Block > {
2525 let maybe_hash = match block. block_ref {
26- BlockRef :: Best => None ,
27- BlockRef :: Hash ( h) => Some ( h) ,
28- BlockRef :: Number ( n) => Some ( match block. wait {
26+ None | Some ( BlockRef :: Best ) => None ,
27+ Some ( BlockRef :: Hash ( h) ) => Some ( h) ,
28+ Some ( BlockRef :: Number ( n) ) => Some ( match block. wait {
2929 true => client. await_block_hash ( n) . await ,
3030 false => client
3131 . block_hash ( n)
You can’t perform that action at this time.
0 commit comments