Skip to content

Commit 304a56c

Browse files
committed
fixed weight
1 parent 357cb16 commit 304a56c

File tree

1 file changed

+3
-8
lines changed
  • precompiles/dispatch-lockdrop/src

1 file changed

+3
-8
lines changed

precompiles/dispatch-lockdrop/src/lib.rs

+3-8
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@ where
106106
exit_status: ExitError::OutOfGas,
107107
});
108108
}
109-
110-
handle.record_external_cost(Some(weight), Some(info.weight.proof_size()))?;
109+
handle.record_external_cost(Some(weight), None)?;
111110

112111
// 3. Ensure that the caller matches the public key
113112
if caller != Self::get_evm_address_from_pubkey(pubkey.as_bytes()) {
@@ -130,19 +129,15 @@ where
130129
if post_info.pays_fee(&info) == Pays::Yes {
131130
let actual_weight = post_info.actual_weight.unwrap_or(info.weight);
132131
let cost = Runtime::GasWeightMapping::weight_to_gas(actual_weight);
133-
handle.record_cost(cost)?;
132+
handle.record_external_cost(None, Some(info.weight.proof_size()))?;
134133

135134
handle.refund_external_cost(
136135
Some(
137136
info.weight
138137
.ref_time()
139138
.saturating_sub(actual_weight.ref_time()),
140139
),
141-
Some(
142-
info.weight
143-
.proof_size()
144-
.saturating_sub(actual_weight.proof_size()),
145-
),
140+
None,
146141
);
147142
}
148143

0 commit comments

Comments
 (0)