bark: fail board when funding tx is double-spent by a confirmed tx

Before this MR, if the board funding transaction was dropped from the mempool due to a double spend, the action would keep trying to rebroadcast the transaction. This makes sense in non-permanent eviction cases like fee fluctuations and perhaps node restarts, but not for double spends.

In this MR, once the double spend is buried required_board_confirmations deep, then the board will be marked failed.

Summary by CodeRabbit

  • Bug Fixes

    • Boards now stop retrying when their funding transaction is conclusively double-spent, and the board is marked failed (with balances cleared) instead of potentially looping indefinitely.
    • Uncertain funding conflicts are handled more safely, keeping boards active until the conflict is clearly resolved.
    • Spent board entries are cleaned up more quietly to reduce unnecessary warnings.
  • Tests

    • Added an integration test to verify the double-spent funding scenario correctly tears down the board and updates movement status.

Fixes ENG-591

Edited by Duncan Dean

Merge request reports

Loading