Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Move registration of ReadRuntimeVersionExt to ExecutionExtension #13820

Merged
merged 1 commit into from
Apr 5, 2023

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented Apr 4, 2023

Instead of registering ReadRuntimeVersionExt in sp-state-machine it is moved to ExecutionExtension which provides the default extensions.

Instead of registering `ReadRuntimeVersionExt` in `sp-state-machine` it is moved to
`ExecutionExtension` which provides the default extensions.
@bkchr bkchr added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Apr 4, 2023
@bkchr bkchr requested a review from a team April 4, 2023 21:35
@@ -810,7 +810,7 @@ where
}

/// Build all extensions that we typically use.
pub(crate) fn full_extensions() -> Extensions {
pub(crate) fn full_extensions<H: HostFunctions>(wasm_executor: WasmExecutor<H>) -> Extensions {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering the bounds on ReadRuntimeVersionExt::new maybe this would be better?

Suggested change
pub(crate) fn full_extensions<H: HostFunctions>(wasm_executor: WasmExecutor<H>) -> Extensions {
pub(crate) fn full_extensions(read_runtime_version: impl ReadRuntimeVersionExt + 'static) -> Extensions {

Probably doesn't matter though; feel free to ignore.

Copy link
Contributor

@melekes melekes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bkchr bkchr merged commit 395853a into master Apr 5, 2023
@bkchr bkchr deleted the bkchr-move-read-runtime-version-init branch April 5, 2023 12:27
@@ -427,6 +427,7 @@ mod tests {
Default::default(),
None,
None,
Arc::new(executor.clone()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Arc::new(executor.clone()),
Arc::new(executor),

gpestana pushed a commit that referenced this pull request Apr 23, 2023
…13820)

Instead of registering `ReadRuntimeVersionExt` in `sp-state-machine` it is moved to
`ExecutionExtension` which provides the default extensions.
nathanwhit pushed a commit to nathanwhit/substrate that referenced this pull request Jul 19, 2023
…aritytech#13820)

Instead of registering `ReadRuntimeVersionExt` in `sp-state-machine` it is moved to
`ExecutionExtension` which provides the default extensions.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants