Returns the number of most recent block.
(data: JsonRpcData<C>)
| 60 | |
| 61 | /// Returns the number of most recent block. |
| 62 | pub async fn block_number<C>(data: JsonRpcData<C>) -> JsonRpcResult<et::U64> |
| 63 | where |
| 64 | C: Client + Sync + Send, |
| 65 | { |
| 66 | let height = data.latest_height().await?; |
| 67 | Ok(et::U64::from(height.value())) |
| 68 | } |
| 69 | |
| 70 | /// Returns the chain ID used for signing replay-protected transactions. |
| 71 | pub async fn chain_id<C>(data: JsonRpcData<C>) -> JsonRpcResult<et::U64> |
nothing calls this directly
no test coverage detected