-
Notifications
You must be signed in to change notification settings - Fork 2.6k
wasm-override: Support checking spec_name
#10380
Conversation
This adds support to the wasm-override feature to compare the spec_name. If the spec_name doesn't match, a warning will be printed and the override will be ignored.
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.
LGTM!
#[derive(Clone, Debug, PartialEq)] | ||
/// The interval in that we will print a warning when a wasm blob `spec_name` | ||
/// doesn't match with the on-chain `spec_name`. | ||
const WARN_INTERVAL: Duration = Duration::from_secs(30); |
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.
wouldn't it be much easier if we just abort the command if this didn't match? I would continuously print a warning if at least the wasm-override was applied, and now you want to warn the user. If it was not even applied, I would either exit
, or warn once about it and move on.
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 would spare you most of the Arc/Mutex layers as well.
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.
wouldn't it be much easier if we just abort the command if this didn't match?
Which command?
I mean the best would be to do that at startup, but there we don't know the spec name and that is also legal to change.
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.
Printing just one warning, will probably not bring that much, as it can be overseen relative easily.
This adds support to the wasm-override feature to compare the spec_name. If the spec_name doesn't match, a warning will be printed and the override will be ignored.
This adds support to the wasm-override feature to compare the spec_name. If the spec_name doesn't match, a warning will be printed and the override will be ignored.
This adds support to the wasm-override feature to compare the spec_name. If the spec_name doesn't
match, a warning will be printed and the override will be ignored.
Closes: #9685