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

Node shows an onchain utxo ready for sweep but was already swept #591

Closed
roeierez opened this issue Nov 7, 2023 · 4 comments
Closed

Node shows an onchain utxo ready for sweep but was already swept #591

roeierez opened this issue Nov 7, 2023 · 4 comments
Assignees

Comments

@roeierez
Copy link
Member

roeierez commented Nov 7, 2023

Version

  • breez sdk 0.2.5
  • green ios
  • block height at the time of writing this issue is 815589 (node seems lagging behind)

Description

  • Already swept funds but the node_info is still returning onchain utxo
  • Sweeping fails because utxo was already spent
sdk> node_info
{
  "id": "039643057ea8af7e3ed538d240ec538c27ba99744ca9bee7e7ace74899ac73c298",
  "block_height": 805356,
  "channels_balance_msat": 0,
  "onchain_balance_msat": 0,
  "utxos": [
    {
      "txid": [
        121,
        107,
        122,
        115,
        252,
        58,
        69,
        170,
        80,
        241,
        43,
        97,
        57,
        157,
        240,
        163,
        13,
        223,
        9,
        159,
        47,
        189,
        48,
        108,
        77,
        165,
        199,
        216,
        250,
        59,
        144,
        165
      ],
      "outnum": 1,
      "amount_millisatoshi": 224175000,
      "address": "bc1qk9gphu3la9ya8w3ue6xypw69zqk0vnager4jfp",
      "reserved": true
    }
  ],
  "max_payable_msat": 0,
  "max_receivable_msat": 4000000000,
  "max_single_payment_amount_msat": 4294967000,
  "max_chan_reserve_msats": 0,
  "connected_peers": [
    "02c811e575be2df47d8b48dab3d3f1c9b0f6e16d0d40b5ed78253308fc2bd7170d"
  ],
  "inbound_liquidity_msats": 0
}
@roeierez
Copy link
Member Author

I think we should unreserve the output before sweeping as a mechanism also to rebroadcast with higher fees.

@roeierez
Copy link
Member Author

duplicate with #531

@dangeross
Copy link
Collaborator

The lagging comment seems to link to Blockstream/greenlight#347 maybe?

@roeierez
Copy link
Member Author

roeierez commented Jan 7, 2024

Could be, yes.
Regardless I think we need to apply this logic (unreserve before sweep). It should allow re-broadcast with updated fees while the tx is in mempool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants