fix subchain request ordering

This commit is contained in:
Robert Habermeier 2016-12-16 23:21:51 +01:00
parent 653363c572
commit 08587a1f56

View File

@ -74,13 +74,15 @@ struct SubchainRequest {
// front of the round are dispatched first.
impl PartialOrd for SubchainRequest {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
self.subchain_parent.0.partial_cmp(&other.subchain_parent.0)
self.subchain_parent.0
.partial_cmp(&other.subchain_parent.0)
.map(Ordering::reverse)
}
}
impl Ord for SubchainRequest {
fn cmp(&self, other: &Self) -> Ordering {
self.subchain_parent.0.cmp(&other.subchain_parent.0)
self.subchain_parent.0.cmp(&other.subchain_parent.0).reverse()
}
}