Hello!
I use JSON RPC API for communication with Solana, but I have the next problem with sending transactions.
I send a transaction to Solana and “SendTransaction” method can return the next responses:
- ok (with transaction ID)
- error “AlreadyProcessed”
- error “BlockhashNotFound”
I’ll get all these response when sending multiple time the same transaction (of course if transaction is correct). But I can get error “BlockhashNotFound” even with the first sending. In this case I want just recreate a transaction with a new blockhash and send it again.
Also it is worth noting I want to stop sending a transaction after getting a transaction ID.
Thus if I’ve sent a correct transaction (with not old blockhash) and lost (by any reason) a transaction Id returned from Solana , later on resending if I get error “BlockhashNotFound” I won’t understand what happened - or my first sending was correct (and I just lost the transaction ID) or my first sending was failed and I should recreate a transaction and resend it again.
The question is how can I get the status or ID of a sent transaction by a serialized value of transaction or some other way?