Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - ARC Broadcast should return status error when a double spend is detected. #105

Open
BraydenLangley opened this issue Jul 9, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@BraydenLangley
Copy link
Collaborator

Bug Description

As described in this PR by @sirdeggen, "orphan should not be considered success. So we ought to go back and make sure the ARC client is making good decisions about whether or not a tx is considered successfully broadcast."

Steps to Reproduce

  1. Create a new transaction that consumes an already spent output.
  2. Broadcast the transaction to ARC.
  3. The status returned, last tested, says "success" instead of "error".

Expected Behavior

In order to correctly identify broadcast errors using the isBroadcastFailure function, the ARC broadcaster should correctly return errors with status of "error" for all common errors that need to be handled.

@BraydenLangley BraydenLangley added the bug Something isn't working label Jul 9, 2024
@boecklim
Copy link
Collaborator

boecklim commented Nov 4, 2024

Hello @BraydenLangley
Here is an example of the response of a tx submission of a tx to ARC with a double spent input

{
    "blockHash": "",
    "blockHeight": 0,
    "competingTxs": [
        "5e58f06a8334301ff77d9109aab08dcc38d89e8cc7bd55da16affa948281d7ed"
    ],
    "extraInfo": "",
    "merklePath": "",
    "status": 200,
    "timestamp": "2024-11-04T09:29:36.89060411Z",
    "title": "OK",
    "txStatus": "DOUBLE_SPEND_ATTEMPTED",
    "txid": "89100426fc13a55260fa65e621e7591f8b01007af62480e818d0da518723bfd3"
}

When you say

The status returned, last tested, says "success" instead of "error".

Which field do you refer to?
Or is it the http status 200 which you mean?

@BraydenLangley BraydenLangley self-assigned this Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants