NatLabs/icrc1

Archive canister get_transactions query exception

Opened this issue · 0 comments

When there are too many transaction records in archive canister, usually more than 1000 records, there will be a situation that the expected number of data does not match the length of the returned data when the transaction record is queried by calling the get_transactions function. After preliminary analysis, the root of the problem is probably located in line 147 of Archive.mo, where the end value is taken from start + length in line 132. Therefore, when the query start is large, The minimum value obtained here is usually bucket.size (). As a result, the query results do not meet expectations.

Iter: = Itertools.fromArraySlice (bucket, start% BUCKET_SIZE, Nat.min (bucket.size (), end))