最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Non-deterministic returns from getParsedTransaction function of solana - Stack Overflow

programmeradmin0浏览0评论

I am experiencing an issue with the getParsedTransaction method in my production-level Solana application. Below is the function I am using: and this is the

transactionHash - 5fjQhxghz4wHDUgECnMYo82C5THbkaJ55PSoJQPT9YxhR95sXfw3Equx3vmDhy4zrqfev97U3cqTA48o88Qei1tT
async getParsedTransactionReceipt(transactionHash: string) {
    const connection = await this.getConnectionWithFallback();
    const tx = await connection.getParsedTransaction(transactionHash, {
      commitment: 'confirmed',
      maxSupportedTransactionVersion: 2,
    });
    return tx;
}

While this function works as expected in most cases, I have noticed that it intermittently returns null for the same transaction. This inconsistency is causing significant issues in my production environment.

Observations: The transaction hash is valid.

The function sometimes returns the expected parsed transaction and, at other times, returns null for the same transaction.

I am using commitment: 'confirmed'.

The issue occurs unpredictably and is not easily reproducible.

Has anyone else encountered this behavior with getParsedTransaction?

What could be the underlying cause of this intermittent response?

Are there any best practices or alternative approaches to ensure a more consistent and reliable response?

Any insights or solutions would be greatly appreciated. Thank you in advance for your help!

发布评论

评论列表(0)

  1. 暂无评论