admin管理员组

文章数量:1355540

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!

本文标签: Nondeterministic returns from getParsedTransaction function of solanaStack Overflow