Closed acheroncrypto closed 1 month ago
We cache the latest blockhash info and reuse that for sending transactions:
https://github.com/solana-playground/solana-playground/blob/99a355ff0def83b1997542dd0535555072bf218b/client/src/utils/pg/tx/tx.ts#L165-L166
However, it doesn't update when cluster changes, which results in Blockhash not found error until the cache update.
Blockhash not found
Update the latest blockhash cache when the cluster changes.
Problem
We cache the latest blockhash info and reuse that for sending transactions:
https://github.com/solana-playground/solana-playground/blob/99a355ff0def83b1997542dd0535555072bf218b/client/src/utils/pg/tx/tx.ts#L165-L166
However, it doesn't update when cluster changes, which results in
Blockhash not found
error until the cache update.Solution
Update the latest blockhash cache when the cluster changes.