Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion client/service/src/client/wasm_substitutes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,13 @@ where
let substitutes = substitutes
.into_iter()
.map(|(block_number, code)| {
let mut hasher = DefaultHasher::new();

Choose a reason for hiding this comment

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

Suggested change
let mut hasher = DefaultHasher::new();

Copy link
Author

Choose a reason for hiding this comment

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

done, thanks 👍

hasher.write(&code);

Choose a reason for hiding this comment

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

Suggested change
hasher.write(&code);

Copy link
Author

Choose a reason for hiding this comment

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

done, thanks 👍

let hash = hasher.finish().to_ne_bytes().to_vec();

Choose a reason for hiding this comment

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

Suggested change
let hash = hasher.finish().to_ne_bytes().to_vec();

Copy link
Author

Choose a reason for hiding this comment

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

done, thanks 👍

let runtime_code = RuntimeCode {
code_fetcher: &WrappedRuntimeCode((&code).into()),
heap_pages: None,
hash: Vec::new(),
hash,

Choose a reason for hiding this comment

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

Suggested change
hash,
hash: make_hash(&code),

Copy link
Author

Choose a reason for hiding this comment

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

done, thanks 👍

};
let version = Self::runtime_version(&executor, &runtime_code)?;
let spec_version = version.spec_version;
Expand Down