Skip to content

Commit a22a64d

Browse files
Juhyung Parkmergify[bot]
authored andcommitted
Log hash in importer log
1 parent bab9bc7 commit a22a64d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/client/importer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ impl Importer {
390390

391391
for header in headers {
392392
let hash = header.hash();
393-
ctrace!(CLIENT, "Importing header {}", header.number());
393+
ctrace!(CLIENT, "Importing header {}-{:?}", header.number(), hash);
394394

395395
if bad.contains(&hash) || bad.contains(header.parent_hash()) {
396396
cinfo!(CLIENT, "Bad header detected : {}", hash);
@@ -400,7 +400,7 @@ impl Importer {
400400

401401
let parent_header = client
402402
.block_header(&BlockId::Hash(*header.parent_hash()))
403-
.expect("Parent of importing header must exist")
403+
.unwrap_or_else(|| panic!("Parent of importing header must exist {:?}", header.parent_hash()))
404404
.decode();
405405
if client.block_header(&BlockId::Hash(hash)).is_some() {
406406
// Do nothing if the header is already imported

0 commit comments

Comments
 (0)