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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 10 deletions

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",
)),