Don't expose metadata for Runtime APIs that haven't been implemented (#6337)
# Description Prior to this PR, the metadata for runtime APIs was entirely based on that generated by `decl_runtime_apis`. It therefore didn't take into account that `impl_runtime_apis` might implement older versions of APIs than what has been declared. This PR filters the returned runtime API metadata to only include methods actually implemented, and also avoids including methods labelled with `changed_in` (which the previous code was atempting to do already but not successfully, owing to the attr being removed prior to the check). We also change all version related things to be `u32`s (rather than VERSION being `u32` and `api_version`s being `u64`) for consistency / ease of comparison. A test is added which works with both the `enable-staging-api` feature in api/tests enabled or disabled, to check all of this. --------- Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: GitHub Action <[email protected]>
Please register or sign in to comment