From 4fd575b5ecdd2513c34949aa28668633ef7bad2b Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 18 Nov 2016 19:52:11 +0800 Subject: [PATCH] Add traces. --- ethcore/src/client/client.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index b8111d77c..3676f0a0a 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -255,11 +255,13 @@ impl Client { registrar: Mutex::new(None), }); if let Some(reg_addr) = client.additional_params().get("registrar").and_then(|s| Address::from_str(s).ok()) { + trace!(target: "client", "Found registrar at {}", reg_addr); let weak = Arc::downgrade(&client); let registrar = Registry::new(reg_addr, move |a, d| weak.upgrade().ok_or("No client!".into()).and_then(|c| c.call_contract(a, d))); - if let Ok(operations) = registrar.get_address(&(&b"operations"[..]).sha3(), "A") { - if !operations.is_zero() { - *client.updater.lock() = Some(Updater::new(Arc::downgrade(&client), operations)); + if let Ok(ops_addr) = registrar.get_address(&(&b"operations"[..]).sha3(), "A") { + if !ops_addr.is_zero() { + trace!(target: "client", "Found operations at {}", ops_addr); + *client.updater.lock() = Some(Updater::new(Arc::downgrade(&client), ops_addr)); } } *client.registrar.lock() = Some(registrar);