Skip to content

ensureRegistered: ensureRegistered may not detect channel registration #207

@matthiasgeihs

Description

@matthiasgeihs

Location

client/adjudicate.go

Problem

func ensureRegistered currently tries determines whether a channel is registered by checking whether a registered event is seen on the event subscription. However, since our subscription only returns the latest event, it may miss the registered event. In particular, it may see a ProgressedEvent or a ConcludedEvent, but not the corresponding RegisteredEvent, and in such a case will not detect the channel as registered.

(This, by the way, shows a downside of our subscription logic. I think it is worth discussing what are actually the benefits of only returning the latest events. At the moment I rather see disadvantages, namely a more complex implementation and potential problems in usage as described above.)

Proposal

To ensure that a registered channel is detected even if the RegisteredEvent is not the latest event on the subscription, we should additionally check for ProgressedEvent and ConcludedEvent.

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