Skip to content

ChainInterface is easy to misuse #80

Closed

Description

@TheBlueMatt

In writing https://github.com/TheBlueMatt/rust-lightning-bitcoinrpc I almost misused ChainWatchInterface, almost calling ChannelManager::block_connected and PeerHandler::block_connected instead of only calling ChainWatchInterfaceUtil::block_connected (which will call the others for you).

I'm not actually sure what a better interface looks like. I played around a bit with making some things pub(crate) in chaininterface but couldn't come up with anything I actually liked, sadly.

Activity

  1. added this to the 0.2 milestone on Sep 19, 2018
  2. dongcarl commented on Feb 22, 2019

    @dongcarl
    Contributor

    I played around a bit with making some things pub(crate) in chaininterface but couldn't come up with anything I actually liked, sadly.

    What was insufficient with pub(crate)?

  3. TheBlueMatt commented on May 9, 2021

    @TheBlueMatt
    CollaboratorAuthor

    We don't have a ChainWatchInterfaceUtil anymore, and this interface is much much harder to mis-use now.

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