Skip to content

Avoid returning failure after initiating a channel #1143

Open

Description

@tnull

open_channel_inner creates a channel before persisting the peer's reconnection information. If that persistence fails, the API returns Error::PersistenceFailed even though the channel is already live and opening messages may have been sent. A caller retrying the apparent failure can therefore open a second channel and repeat any push amount. The affected ordering is in src/lib.rs:1418-1449 at main 1dea48a5ea06e5af2eabbf0633b32aee3338bd6c; an ordinary transient peer-store write failure is sufficient.

Make the result accurately reflect whether channel opening was initiated: persist the required peer information before creating the channel, or return the initiated channel's ID and report the persistence problem separately. Add a regression that fails only the peer-store write and verifies the API cannot report an ordinary failed initiation while leaving a live channel; include successful initiation and retry controls. Fixing peer-store cache rollback alone does not fix this ordering issue. No regression test or production patch was run during triage.

Activity

  1. added a commit that references this issue on Oct 11, 2026
    3a45f42
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