fixed size event topics

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
Cyrill Leutwiler
2024-09-10 09:09:52 +02:00
parent 77df88b3cb
commit 6635a0b337
3 changed files with 6 additions and 9 deletions
+3 -1
View File
@@ -43,6 +43,7 @@ where
context.byte_type().array_type(topics_buffer_size as u32),
"topics_buffer",
);
for (n, topic) in topics.iter().enumerate() {
let topic_buffer_offset = context
.xlen_type()
@@ -57,6 +58,7 @@ where
context.build_byte_swap(topic.as_basic_value_enum())?,
)?;
}
[
context
.builder()
@@ -68,7 +70,7 @@ where
.as_basic_value_enum(),
context
.xlen_type()
.const_int(topics_buffer_size as u64, false)
.const_int(topics.len() as u64, false)
.as_basic_value_enum(),
input_pointer.as_basic_value_enum(),
input_length.as_basic_value_enum(),