Skip to content

Commit

Permalink
Fix ChainService error handle
Browse files Browse the repository at this point in the history
  • Loading branch information
eval-exec committed Oct 13, 2023
1 parent 3b74292 commit 245a11d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions chain/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,9 @@ impl ChainService {

match unverified_block_tx.send(unverified_block) {
Ok(_) => {}
Err(err) => error!("send unverified_block_tx failed: {}", err),
Err(err) => {
error!("send unverified_block_tx failed: {}", err)
}
};

if total_difficulty
Expand Down Expand Up @@ -687,11 +689,9 @@ impl ChainService {
Err(SendError(lonely_block)) => {
error!("notify new block to orphan pool err: {}", err);
if let Some(verify_callback) = lonely_block.verify_callback {
verify_callback(
InternalErrorKind::System
.other("OrphanBlock broker disconnected")
.into(),
);
verify_callback(Err(InternalErrorKind::System
.other("OrphanBlock broker disconnected")
.into()));
}
}
}
Expand Down

0 comments on commit 245a11d

Please sign in to comment.