Spit log data charge into two (#21349)
This commit is contained in:
		| @@ -2403,11 +2403,14 @@ impl<'a> SyscallObject<BpfError> for SyscallLogData<'a> { | ||||
|                 budget | ||||
|                     .syscall_base_cost | ||||
|                     .saturating_mul(untranslated_fields.len() as u64) | ||||
|                     .saturating_add( | ||||
|                         untranslated_fields | ||||
|                             .iter() | ||||
|                             .fold(0, |total, e| total.saturating_add(e.len() as u64)) | ||||
|                     ) | ||||
|             ), | ||||
|             result | ||||
|         ); | ||||
|         question_mark!( | ||||
|             invoke_context.get_compute_meter().consume( | ||||
|                 untranslated_fields | ||||
|                     .iter() | ||||
|                     .fold(0, |total, e| total.saturating_add(e.len() as u64)) | ||||
|             ), | ||||
|             result | ||||
|         ); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user