complete quick'n'dirty light CLI
This commit is contained in:
@@ -662,6 +662,8 @@ pub struct LightSyncParams<L> {
|
||||
pub network_id: u64,
|
||||
/// Subprotocol name.
|
||||
pub subprotocol_name: [u8; 3],
|
||||
/// Other handlers to attach.
|
||||
pub handlers: Vec<Arc<LightHandler>>,
|
||||
}
|
||||
|
||||
/// Service for light synchronization.
|
||||
@@ -696,6 +698,10 @@ impl LightSync {
|
||||
let sync_handler = try!(SyncHandler::new(params.client.clone()));
|
||||
light_proto.add_handler(Arc::new(sync_handler));
|
||||
|
||||
for handler in params.handlers {
|
||||
light_proto.add_handler(handler);
|
||||
}
|
||||
|
||||
Arc::new(light_proto)
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user