ston-fi / tonlib-rs

Rust SDK for The Open Network
https://github.com/ston-fi/tonlib-rs
MIT License
181 stars 40 forks source link

get_raw_transactions_v2 count limit #113

Open JaydenElliott opened 2 hours ago

JaydenElliott commented 2 hours ago

Hey, thanks for the library, working well so far.

I'm running into a limit of 16 for the count param of get_raw_transactions_v2(). If I pass some number greater than 16, it will only return 16 transactions:

 let tx = client
                .get_raw_transactions_v2(&addr, &id, 100, false)
                .await?;
assert_eq!(tx.transactions.len(), 16);

I've written a workaround which will just get the last transaction id of the 16th and re-run the function, but i'm curious if this was intended (the python sdk doesn't have this restriction). Can submit a PR implimenting this if you need.

Sild commented 2 hours ago

Hi, thank you for your report

It's worth to discuss it, but basically tonlib_client provides raw implementation of tonlib_api

I'm not sure if we want to make it smarter and handle such cases (I'm pretty sure 16 results is a lite-node restriction)