1
0
mirror of https://github.com/romanz/electrs.git synced 2024-11-19 01:43:29 +01:00

Don't crash on orphan blocks

This commit is contained in:
Roman Zeyde 2018-05-18 09:52:12 +03:00
parent 4a8f7b5c0b
commit e14f7f7174
No known key found for this signature in database
GPG Key ID: 87CAE5FA46917CBB

View File

@ -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()