node: Don't panic on initialization error

This commit is contained in:
cloudhead
2024-01-10 15:23:05 +01:00
parent 14b90ffbf9
commit 073c55fa3b
3 changed files with 27 additions and 14 deletions
+2 -5
View File
@@ -338,15 +338,12 @@ where
G: Signer + Ecdh<Pk = NodeId>,
{
pub fn new(
mut service: Service<D, S, G>,
service: Service<D, S, G>,
worker: chan::Sender<Task>,
signer: G,
proxy: net::SocketAddr,
clock: LocalTime,
) -> Self {
service
.initialize(clock)
.expect("Wire::new: error initializing service");
assert!(service.started().is_some(), "Service must be initialized");
Self {
service,