pub struct Constructor {
pub downstream: SharedDownstream,
/* private fields */
}Expand description
The complete stack
Fields§
§downstream: SharedDownstreamthis should be accessed by Lightning
Implementations§
Source§impl Constructor
impl Constructor
Sourcepub fn open_db(
path: Option<&Path>,
network: Network,
_birth: u64,
) -> Result<SharedChainDB, Error>
pub fn open_db( path: Option<&Path>, network: Network, _birth: u64, ) -> Result<SharedChainDB, Error>
open DBs
Sourcepub fn new(
network: Network,
listen: Vec<SocketAddr>,
chaindb: SharedChainDB,
) -> Result<Constructor, Error>
pub fn new( network: Network, listen: Vec<SocketAddr>, chaindb: SharedChainDB, ) -> Result<Constructor, Error>
Construct the stack
Sourcepub fn run(
&mut self,
network: Network,
peers: Vec<SocketAddr>,
min_connections: usize,
) -> Result<(), Error>
pub fn run( &mut self, network: Network, peers: Vec<SocketAddr>, min_connections: usize, ) -> Result<(), Error>
Run the stack. This should be called AFTER registering listener of the ChainWatchInterface, so they are called as the stack catches up with the blockchain
- peers - connect to these peers at startup (might be empty)
- min_connections - keep connections with at least this number of peers. Peers will be randomly chosen from those discovered in earlier runs
Auto Trait Implementations§
impl Freeze for Constructor
impl !RefUnwindSafe for Constructor
impl Send for Constructor
impl Sync for Constructor
impl Unpin for Constructor
impl !UnwindSafe for Constructor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more