Please describe the feature you’d like to see added.
I would like to fine grain error which informs whether the input is actually spent or if it is an orphan tx. I have logic that wants to do different things whether the parent is confirmed or not.
Is your feature related to a problem, if so please describe it.
Right now, the error code returned combines two scenarios where input is either missing or spent. In one scenario, I want to abandon the transaction because the input is already spent. In the other scenario, I want to resend the parent tx.
Describe the solution you’d like
Two different error code for the separate scenarios.
Describe any alternatives you’ve considered
Query bitcoin again for the parent tx state to check the state of transaction. But unfortunately, this is not applicable in my scenario because we are using bitcoind behind a Load balancer and I cannot guarantee that same bitcoind gets the request again. It would be great to have bitcoind itself return more detailed error code.
I understand that my setup might not ideal and running stateful bitcoind with different mempools is probably not a good idea. But I feel that this finer error code is still valuable.