bark: protect wallet creation with the daemon lifecycle lock

bark create can modify or remove wallet files before acquiring the wallet lock. This can interfere with a running barkd or another CLI wallet creation on the same datadir.

This change makes CLI creation hold the existing barkd.lock through creation and cleanup after failure. It refuses creation if that lock is already held, including with --force.

This is a focused fix for daemon/creator and creator/creator conflicts. It does not address the broader locking order between creation and ordinary CLI wallet commands.

Extracted from !2577 to keep that MR focused on log rotation.

Tests

Adds integration coverage for:

  • Refusing creation while a walletless daemon owns the datadir.

  • Refusing a second concurrent CLI creation.

  • Releasing the lock after failed creation so a retry can proceed.

  • check or remove this line after you've added a CHANGELOG entry or if your PR doesn't need one (they should go into CHANGELOG/unreleased/)

Edited by Ignacio Porte Stefoni

Merge request reports

Loading
Loading