improve local cluster stake verification (#5551)

This commit is contained in:
Rob Walker
2019-08-17 12:28:20 -07:00
committed by GitHub
parent 25403e61ed
commit 52c2191545

View File

@@ -508,19 +508,11 @@ impl LocalCluster {
(_, None) => Err(Error::new(ErrorKind::Other, "invalid vote account data")),
}
}
(Ok(None), _) => Err(Error::new(
(Ok(None), _) | (Err(_), _) => Err(Error::new(
ErrorKind::Other,
"unable to retrieve stake account data",
)),
(_, Ok(None)) => Err(Error::new(
ErrorKind::Other,
"unable to retrieve vote account data",
)),
(Err(_), _) => Err(Error::new(
ErrorKind::Other,
"unable to retrieve stake account data",
)),
(_, Err(_)) => Err(Error::new(
(_, Ok(None)) | (_, Err(_)) => Err(Error::new(
ErrorKind::Other,
"unable to retrieve vote account data",
)),