Better panic message in sync in case of no peers.

This commit is contained in:
Ignotus Peverell 2017-11-18 13:54:44 -05:00
parent 256283966a
commit addaadf711
No known key found for this signature in database
GPG key ID: 99CD25F39F8F8211

View file

@ -106,7 +106,7 @@ impl Syncer {
let tip = self.chain.get_header_head()?;
// TODO do something better (like trying to get more) if we lose peers
let peer = self.p2p.most_work_peer().unwrap();
let peer = self.p2p.most_work_peer().expect("No peers available for sync.");
debug!(
LOGGER,
"Sync: peer {} vs us {}",