Skip to content

process_events_async_with_kv_store_sync isn't actually usable #4111

Closed

Description

@TheBlueMatt

It requires a OS: Deref<Target = OutputSweeper<T, D, F, CF, KVStoreSyncWrapper<K>, L, O>>, but you can't get such an object from an OutputSweeperSync outside of a test environment (and we don't really want to expose it). Not sure how to fix this, but we need to....

Activity

  1. added this to the 0.2 milestone on Sep 23, 2025
  2. tnull commented on Sep 24, 2025

    @tnull
    Contributor

    It requires a OS: Deref<Target = OutputSweeper<T, D, F, CF, KVStoreSyncWrapper<K>, L, O>>, but you can't get such an object from an OutputSweeperSync outside of a test environment (and we don't really want to expose it). Not sure how to fix this, but we need to....

    Well, the title isn't entirely accurate as we use it in LDK Node pre-lightningdevkit/ldk-node#633. I think you can get such a monstrosity via OutputSweeper::new_with_kv_store_sync (see https://github.com/lightningdevkit/ldk-node/blob/65945f8e25ef7d1f6a621115f814678a661470ce/src/builder.rs#L1613).

    I'm still in favor of dropping process_events_async_with_kv_store_sync altogether though.

  3. TheBlueMatt commented on Sep 24, 2025

    @TheBlueMatt
    CollaboratorAuthor

    Bleh, that's borderline unsafe - having blocking IO in something that pretends to be async is not a great outcome.

  4. TheBlueMatt commented on Sep 25, 2025

    @TheBlueMatt
    CollaboratorAuthor

    Fixed in #4119.

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions