From e14f7f717497071b2ce86043f39f8dd5501d5873 Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Fri, 18 May 2018 09:52:12 +0300 Subject: [PATCH] Don't crash on orphan blocks --- src/index.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.rs b/src/index.rs index 3e28c52..b7e3041 100644 --- a/src/index.rs +++ b/src/index.rs @@ -63,7 +63,9 @@ impl HeaderList { hashed_headers.push_front(HashedHeader { blockhash, header }); blockhash = header.prev_blockhash; } - assert!(header_map.is_empty()); + if !header_map.is_empty() { + warn!("orphaned blocks: {:?}", header_map); + } HeaderList { headers: hashed_headers .into_iter()