-
Notifications
You must be signed in to change notification settings - Fork 105
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(core-code) Optimisation of read-write structures for code instrumentation #4274
base: master
Are you sure you want to change the base?
Conversation
…or better consistency
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.
will be refactored as discussed in dm
…harge architecture was changed to type state pattern
pallets/gear/src/lib.rs
Outdated
T::CodeStorage::update_instrumented_code(code_id, instrumented_code.clone()); | ||
T::CodeStorage::update_code_metadata(code_id, metadata); |
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.
Functions should be merged like add_code
and remove_code
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.
Agreed, made a function in storage that writes both of these values
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.
and didn't use it*
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.
The update_instrumented_code_and_metadata
function is definitely used in reinstrument_code
and in the state_rpc_calls_trigger_reinstrumentation
test
…n-refactoring # Conflicts: # gclient/src/api/calls.rs
Code structure constructor now returns 3 parameters: InstrumentedCode, OriginalCode and CodeMetadata
CodeMetadata contains all the necessary data to infer the need for code instrumentation
Rewritten precharge to type-state pattern