Skip to content

Commit

Permalink
[dry-transaction] Update storage gas price returned (MystenLabs#10110)
Browse files Browse the repository at this point in the history
What the title says
  • Loading branch information
tzakian authored Mar 29, 2023
1 parent 17b465d commit 1e2f481
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/sui-core/src/authority.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1085,6 +1085,12 @@ impl AuthorityState {
// Returning empty vector here because we recalculate changes in the rpc layer.
let balance_changes = Vec::new();

// Update the storage gas price
let reference_gas_price = epoch_store.reference_gas_price();
let TransactionEffects::V1(mut inner_effects) = effects;
inner_effects.gas_used.storage_cost *= reference_gas_price;
let effects = TransactionEffects::V1(inner_effects);

Ok((
DryRunTransactionBlockResponse {
effects: effects.clone().try_into()?,
Expand Down

0 comments on commit 1e2f481

Please sign in to comment.