Skip to content

Commit f58a4e0

Browse files
committed
deleted split_into_reverse_chunks method
1 parent c98d6e5 commit f58a4e0

File tree

1 file changed

+0
-25
lines changed
  • target_chains/ton/contracts/contracts/common

1 file changed

+0
-25
lines changed

target_chains/ton/contracts/contracts/common/utils.fc

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,31 +34,6 @@ int keccak256_slice(slice s) inline {
3434
return keccak256_tuple(slices);
3535
}
3636

37-
;; Splits a slice into chunks of MAX_BITS bits or less, in reverse order
38-
(cell, slice) split_into_reverse_chunks(slice data, int size) {
39-
cell chunks = null();
40-
int total_bits_loaded = 0;
41-
builder current_chunk = begin_cell();
42-
while ((~ data.slice_empty?()) & (total_bits_loaded < size)) {
43-
int bits_to_load = min(min(data.slice_bits(), MAX_BITS - current_chunk.builder_bits()), size - total_bits_loaded);
44-
current_chunk = current_chunk.store_slice(data~load_bits(bits_to_load));
45-
total_bits_loaded += bits_to_load;
46-
if ((current_chunk.builder_bits() == MAX_BITS) | (size - total_bits_loaded == 0)) {
47-
slice current_chunk_slice = current_chunk.end_cell().begin_parse();
48-
if (cell_null?(chunks)) {
49-
chunks = begin_cell().store_slice(current_chunk_slice).end_cell();
50-
} else {
51-
chunks = begin_cell().store_slice(current_chunk_slice).store_ref(chunks).end_cell();
52-
}
53-
current_chunk = begin_cell();
54-
}
55-
if ((data.slice_bits() == 0) & (~ data.slice_refs_empty?())) {
56-
data = data~load_ref().begin_parse();
57-
}
58-
}
59-
return (chunks, data);
60-
}
61-
6237
{-
6338
This function reads a specified number of bits from the input slice and stores them in a cell structure,
6439
handling data that may exceed the maximum cell capacity in FunC (1023 bits).

0 commit comments

Comments
 (0)