Skip to content

Commit

Permalink
Removed usage of execution config
Browse files Browse the repository at this point in the history
  • Loading branch information
xgreenx committed Nov 9, 2021
1 parent 7aa4234 commit 21f5fd7
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions crates/lang/codegen/src/generator/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -667,9 +667,7 @@ impl Dispatch<'_> {
);
quote_spanned!(message_span=>
Self::#message_ident(input) => {
if #mutates_storage {
config.mutates = #mutates_storage;
}
mutates = #mutates_storage;

if #deny_payment {
::ink_lang::codegen::deny_payment::<<#storage_ident as ::ink_lang::reflect::ContractEnv>::Env>()?;
Expand Down Expand Up @@ -748,16 +746,12 @@ impl Dispatch<'_> {
::core::mem::ManuallyDrop::new(
::ink_storage::traits::pull_spread_root::<#storage_ident>(&root_key)
);
let mut config = ::ink_lang::codegen::ExecuteMessageConfig {
payable: false,
mutates: false,
dynamic_storage_alloc: false,
};
let mutates;
match self {
#( #message_execute ),*
}?;

if config.mutates {
if mutates {
::ink_storage::traits::push_spread_root::<#storage_ident>(&contract, &root_key);
}
if #is_dynamic_storage_allocation_enabled {
Expand Down

0 comments on commit 21f5fd7

Please sign in to comment.