Skip to content

Move to a Monitor-Update return from copying around ChannelMonitors #387

Closed

Description

@TheBlueMatt

We may already have an issue for this, not sure, but opening in any case.

Currently, Channels keep a copy of their ChannelMonitors and any time we need to update it we copy the full thing out and hand it upwards. This sucks for performance, most of all because that monitor doesn't even get used eventually, it just gets merged in. We should be able to have some concept of a "Update" struct which we can pass up instead.

Activity

  1. added this to the 0.2 milestone on Nov 4, 2019
  2. TheBlueMatt commented on Feb 6, 2020

    @TheBlueMatt
    CollaboratorAuthor

    I'm taking a look at this - I ended up kinda needing to do this because:
    a) want to move Events into ChannelMonitors from the SimpleManyChannelMonitor to continue #474 as this makes it much easier to work with ChannelMonitors during rescan, but
    b) leaving ChannelMonitors: Clone while holding events in them is super easy to misuse, as you may end up with multiple copies, with different pending events, or running events multiple times.

    Ideally the solution is to implement this and then making ChannelMonitors not Clone at all, instead forcing the user to do something like clone_to_watchtower_mode or so.

  3. valentinewallace commented on Jul 17, 2020

    @valentinewallace
    Contributor

    closeable?

  4. TheBlueMatt commented on Jul 20, 2020

    @TheBlueMatt
    CollaboratorAuthor

    Arguably #657 is the last step here, but I'll just close this and we can track it there.

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions