mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
More explicit panic when syn can't get a peer
This commit is contained in:
parent
31f8f2ad3e
commit
861c54c13b
1 changed files with 1 additions and 1 deletions
|
@ -316,7 +316,7 @@ impl Syncer {
|
|||
|
||||
/// Pick a random peer and ask for a block by hash
|
||||
fn request_block(&self, h: Hash) {
|
||||
let peer = self.p2p.random_peer().unwrap();
|
||||
let peer = self.p2p.random_peer().expect("No connected peer.");
|
||||
let peer = peer.read().unwrap();
|
||||
if let Err(e) = peer.send_block_request(h) {
|
||||
debug!(LOGGER, "Sync: Error requesting block: {:?}", e);
|
||||
|
|
Loading…
Reference in a new issue