We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
env: macos x86, cargo 1.79.0,
cargo.toml: tonlib-core = { git="https://github.com/ston-fi/tonlib-rs.git", branch="main" } tonlib-client = { git="https://github.com/ston-fi/tonlib-rs.git", branch="main" } tonlib-sys = { version="2024.9" }
testnet config: https://ton.org/testnet-global.config.json
` async fn create_client()-> anyhow::Result{ TonClient::set_log_verbosity_level(2); let retry = RetryStrategy { interval_ms: 1000, max_retries: 10, }; let client = TonClientBuilder::new() .with_connection_params(&TonConnectionParams { config: TESTNET_ACTUAL.to_string(), blockchain_name: None, use_callbacks_for_network: false, ignore_cache: false, keystore_dir: None, notification_queue_length: DEFAULT_NOTIFICATION_QUEUE_LENGTH, concurrency_limit: DEFAULT_CONNECTION_CONCURRENCY_LIMIT, }) .with_pool_size(10) // .with_retry_strategy(&retry) .build() .await?; Ok(client) }
pub async fn test() -> anyhow::Result<()> { let client = create_client().await?; let (_, info) = client.get_masterchain_info().await?; info!("MasterchainInfo: {:?}", &info);
let block_id = BlockId { workchain: info.last.workchain, shard: info.last.shard, seqno: info.last.seqno, }; let block_id_ext = client.lookup_block(1, &block_id, 0, 0).await?; info!("BlockIdExt: {:?}", &block_id_ext); } `
The text was updated successfully, but these errors were encountered:
No branches or pull requests
env:
macos x86, cargo 1.79.0,
cargo.toml:
tonlib-core = { git="https://github.com/ston-fi/tonlib-rs.git", branch="main" }
tonlib-client = { git="https://github.com/ston-fi/tonlib-rs.git", branch="main" }
tonlib-sys = { version="2024.9" }
testnet config: https://ton.org/testnet-global.config.json
`
async fn create_client()-> anyhow::Result{
TonClient::set_log_verbosity_level(2);
let retry = RetryStrategy {
interval_ms: 1000,
max_retries: 10,
};
let client = TonClientBuilder::new()
.with_connection_params(&TonConnectionParams {
config: TESTNET_ACTUAL.to_string(),
blockchain_name: None,
use_callbacks_for_network: false,
ignore_cache: false,
keystore_dir: None,
notification_queue_length: DEFAULT_NOTIFICATION_QUEUE_LENGTH,
concurrency_limit: DEFAULT_CONNECTION_CONCURRENCY_LIMIT,
})
.with_pool_size(10)
// .with_retry_strategy(&retry)
.build()
.await?;
Ok(client)
}
pub async fn test() -> anyhow::Result<()> {
let client = create_client().await?;
let (_, info) = client.get_masterchain_info().await?;
info!("MasterchainInfo: {:?}", &info);
let block_id = BlockId {
workchain: info.last.workchain,
shard: info.last.shard,
seqno: info.last.seqno,
};
let block_id_ext = client.lookup_block(1, &block_id, 0, 0).await?;
info!("BlockIdExt: {:?}", &block_id_ext);
}
`
The text was updated successfully, but these errors were encountered: