cryptoadvance / specter-desktop

A desktop GUI for Bitcoin Core optimised to work with hardware wallets
MIT License
797 stars 237 forks source link

"Abandon Transaction" doesn't work #1491

Open wchancao opened 2 years ago

wchancao commented 2 years ago

A couple of days ago i received some sats that never were confirmed, the tx is not in my mempool, looked for it in several block explorers and is not there neither, i click on "Abandon Transaction" on Specter but is still showing that unconfirmed transaction and doesn't delete it from History.

Specter v1.7.1

k9ert commented 2 years ago

Your're talking about the button shown here, right: #991

I've never used that button myself. Can you check the logs when you click the button? CC @kdmukai

wchancao commented 2 years ago

Yes, that button... This is what logs shows when i click the button. specter_error

kdmukai commented 2 years ago

I'm not sure. The only issue I can think of is that the abandon tx tests were all around an outgoing tx. I don't know if there'd be any reason for an incoming tx to be handled differently.

k9ert commented 2 years ago

Is that transaction still visible on your side? I would assume that it's not because i don't know where it could be persisted.

wchancao commented 2 years ago

Yep, it is still there on my tx list...

relativisticelectron commented 2 years ago

I get this error too. (mainnet and regtest)

relativisticelectron commented 2 years ago

The rpc output of gettransaction (see: https://github.com/bitcoin-dot-org/developer.bitcoin.org/blob/master/reference/rpc/gettransaction.rst) should contain the field "abandoned" : true|false but I get image

and with listtransactions I get

  {
    "address": "bcrt1qj9f396kpwfygv0x598yq5thyedu6vujaycv694",
    "category": "receive",
    "amount": 1.00000000,
    "label": "",
    "vout": 0,
    "confirmations": 0,
    "trusted": false,
    "txid": "12c830bb3b4204f62870621602e306ee92f614353ba198899fa9985a5c1db55d",
    "walletconflicts": [
    ],
    "time": 1652429036,
    "timereceived": 1652429036,
    "bip125-replaceable": "yes"
  }

This makes it impossible to detect here https://github.com/cryptoadvance/specter-desktop/blob/767d5a88b80454f391fd9b31cae348373a5dc607/src/cryptoadvance/specter/wallet.py#L387 if a transaction is abandoned.

It seems that bitcoin core rpc does not return abandoned this for receiving https://github.com/bitcoin/bitcoin/blob/225e5b57b2ee2bc1acd7f09c89ccccc15ef8c85f/src/wallet/rpc/transactions.cpp#L380