From 99186e90f0309c64c968beacf39da110ad49294f Mon Sep 17 00:00:00 2001 From: Simon B Date: Mon, 18 Dec 2017 14:17:11 +0100 Subject: [PATCH] better error messages + some cleanup (#497) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * distinguish select (among futures) from select coins. Regex search in project for select\b shows we hardly use select, but maybe could use it to add timeouts more cleanly. ("Want to add a timeout to any future? Just do a select of that future and a timeout future!" from https://aturon.github.io/blog/2016/08/11/futures/) * remove a trailing space * FAQ.md - fix typo * wallet: display problematic tx * update FAQ build troubleshooting to cover #443 * stdout_log_level = Info file_log_level = Debug * sync: show total diff @ height when syncronization is completed * better wallet send dest format error * move INFO "Client conn ... lost" and "Connected to peer" down to Debug * move some level=Info to Debug, add 1000-block outputs --- chain/src/pipe.rs | 13 ++++++++++--- doc/FAQ.md | 9 +++++++-- grin.toml | 6 +++--- grin/src/sync.rs | 2 +- grin/tests/simulnet.rs | 4 ++-- p2p/src/handshake.rs | 3 +-- p2p/src/peer.rs | 2 +- wallet/src/receiver.rs | 1 + wallet/src/sender.rs | 6 +++--- wallet/src/types.rs | 2 +- 10 files changed, 30 insertions(+), 18 deletions(-) diff --git a/chain/src/pipe.rs b/chain/src/pipe.rs index 536875c6..8188d957 100644 --- a/chain/src/pipe.rs +++ b/chain/src/pipe.rs @@ -369,12 +369,16 @@ fn update_head(b: &Block, ctx: &mut BlockContext) -> Result, Error> .map_err(|e| Error::StoreErr(e, "pipe save head".to_owned()))?; } ctx.head = tip.clone(); - info!( + debug!( LOGGER, "Updated head to {} at {}.", b.hash(), b.header.height ); + if b.header.height % 500 == 0 { + info!(LOGGER, "pipe: chain head reached {} @ {} [{}]", + b.header.height, b.header.difficulty, b.hash()); + } Ok(Some(tip)) } else { Ok(None) @@ -388,12 +392,15 @@ fn update_sync_head(bh: &BlockHeader, ctx: &mut BlockContext) -> Result Result