SwiftLightning icon indicating copy to clipboard operation
SwiftLightning copied to clipboard

documentation: expand Chain Monitor section in Overview

Open valentinewallace opened this issue 4 years ago • 1 comments

I like the README as an overview :)

I think this section could use a bit more explanation in the vein of the prior two sections.

I'm hesitant to recommend the ChainWatchInterface because I think @jkczyz is trying to refactor it out and make it private (Jeff am I misinterpreting this?).

As a replacement, maybe something like: "This brings us to chain monitoring. We need a way to tell Rust Lightning about new blocks and their relevant transactions. For this you'll need to instantiate a BlockNotifier struct, which handles informing internal Rust Lightning data structures about newly (dis)connected and relevant transactions within the blocks."

I changed it from saying "the chain monitor" because there's no ChainMonitor per se..

valentinewallace avatar Jun 16 '20 22:06 valentinewallace

I'm hesitant to recommend the ChainWatchInterface because I think @jkczyz is trying to refactor it out and make it private (Jeff am I misinterpreting this?).

It will likely continue to be part of SimpleManyChannelMonitor in the first round of refactoring but will not be part of BlockNotifier. Basically, I'm pushing it down from BlockNotifier into a ChainListener.

But otherwise I concur with @valentinewallace on cleaning up the wording. Currently, ChainWatchInterface simply maintains a filter for blocks coming from BlockNotifier. I don't think ChainWatchInterface is used independently but rather is a required part of SimpleManyChannelMonitor.

jkczyz avatar Jun 17 '20 07:06 jkczyz