Sometimes our back end is able to create a transaction in the stellar network, but for some instability or bug or unknown problem, discards the transaction hash.
When retrying the transaction after fixing the instabilities, we get op_already_exists
as a result. We want to automatically treat that exception as a success, and return the original transaction.
But skimming at Horizon API reference, there's no such thing as querying for a duplicated transaction - the only options are querying for all transactions for an account or ledger. Parsing and finding the original transaction in the full transaction history for an account seems like a huge waste.
Is there any way for querying for the original transaction or operation in a op_already_exists
scenario without combing the full account transaction history?
op_already_exists
means that account you are trying to create already exists. So I think that when you submit the second transaction it's not a duplicate transaction but the duplicated account. Second, what do you mean by saying that the network "discards the transaction hash"?