Skip to content

Return NotRunning consistently for live-node APIs #1141

Closed

Description

@tnull

API methods that require a running node do not consistently reject calls after the node has stopped. For example, OnchainPayment::bump_fee_rbf can reach wallet mutation and signing after Node::stop(), whereas the on-chain send methods return Error::NotRunning. This is a correctness issue in the API lifecycle contract.

Review all public API paths that require a live node and ensure they return Error::NotRunning when it is stopped, before performing side effects. Add missing checks consistently, including RBF fee bumps, and regression coverage for calls after shutdown and normal operation after restart. Preserve methods that intentionally support offline use. We should also address the TOCTOU race where a send passes its running-state check, shutdown completes, and the send then continues to mutate the wallet or queue a transaction.

Activity

  1. tnull commented on Oct 22, 2026

    @tnull
    CollaboratorAuthor

    Done in #1160.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions