-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor Runtime APIs Implementation and Update Import Paths #495
Conversation
/describe |
PR Description updated to latest commit (aeb8188) |
@@ -122,7 +110,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { | |||
authoring_version: 1, | |||
spec_version: 1201, | |||
impl_version: 0, | |||
apis: RUNTIME_API_VERSIONS, | |||
apis: apis::PUBLIC_RUNTIME_API_VERSIONS, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it might sound like too much, but do you think it is worth adding a test for the apis::PUBLIC_RUNTIME_API_VERSIONS
value? so we ensure it doesn't change. If not why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, not nice: it's forced by the fact that the macro defines RUNTIME_API_VERSIONS
not public. I am trying to expose the problem to the polkadot-sdk guys. We'll see if they accept it.
We can choose another name for sure... :D
Type
enhancement
Description
laos_runtime
from using macros to direct coding, enhancing readability and maintainability.RuntimeApi
and dispatch method innode/src/service.rs
to align with the new structure.apis
module public inruntime/laos/src/lib.rs
and updated the runtime versioning to useapis::PUBLIC_RUNTIME_API_VERSIONS
.Changes walkthrough
service.rs
Update Runtime API Import Paths and Dispatch Method
node/src/service.rs
RuntimeApi
updated tolaos_runtime::apis::RuntimeApi
.laos_runtime::apis::api::dispatch
instead oflaos_runtime::api::dispatch
.apis.rs
Refactor Runtime APIs Implementation from Macro to Direct Coding
runtime/laos/src/apis.rs
and structures.
PUBLIC_RUNTIME_API_VERSIONS
for exposing runtime APIversions.
lib.rs
Expose APIs Module and Update Runtime Versioning
runtime/laos/src/lib.rs
apis
module public.VERSION
to useapis::PUBLIC_RUNTIME_API_VERSIONS
for APIversions.
impl_runtime_apis_plus!();
.