Skip to content

Commit f9cb19d

Browse files
committed
catch error
1 parent a022610 commit f9cb19d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

stackslib/src/cli.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -871,8 +871,9 @@ fn replay_naka_staging_block(db_path: &str, index_block_hash_hex: &str, conf: &C
871871
let (block, block_size) = chainstate
872872
.nakamoto_blocks_db()
873873
.get_nakamoto_block(&block_id)
874-
.unwrap()
875-
.unwrap();
874+
.unwrap_or_else(|e| panic!("DB error fetching {:?}: {:?}", block_id, e))
875+
.unwrap_or_else(|| panic!("No block found for id {:?}", block_id));
876+
876877
replay_block_nakamoto(&mut sortdb, &mut chainstate, &block, block_size).unwrap();
877878
}
878879

0 commit comments

Comments
 (0)