fn cmp(&self, other: &Self) -> Ordering {
        if self.power != other.power {
            self.power.cmp(&other.power)
        } else {
            self.eth_address.cmp(&other.eth_address).reverse()
        }
    }
// Alex wrote the Go sorting implementation for validator
// sets as Greatest to Least, now this isn't the convention
// for any standard sorting implementation and Rust doesn't
// really like it when you implement sort yourself. It prefers
// Ord. So here we implement Ord with the Eth address sorting
// reversed, since they are also sorted greatest to least in
// the Cosmos module. Then we can call .sort and .reverse and get
// the same sorting as the Cosmos module.
Alex wrote the Go sorting implementation for validator
sets as Greatest to Least, now this isn't the convention
for any standard sorting implementation and Rust doesn't
really like it when you implement sort yourself. It prefers
Ord. So here we implement Ord with the Eth address sorting
reversed, since they are also sorted greatest to least in
the Cosmos module. Then we can call .sort and .reverse and get
the same sorting as the Cosmos module.
Alex wrote the Go sorting implementation for validator sets as Greatest to Least now this isn ' t the convention for any standard sorting implementation and Rust doesn ' t really like it when you implement sort yourself . It prefers Ord . So here we implement Ord with the Eth address sorting reversed since they are also sorted greatest to least in the Cosmos module . Then we can call . sort and . reverse and get the same sorting as the Cosmos module .
fn cmp(&self, other: &Self) -> Ordering {
        if self.power != other.power {
            self.power.cmp(&other.power)
        } else {
            self.eth_address.cmp(&other.eth_address).reverse()
        }
    }
fn cmp ( & self , other : & Self ) -> Ordering { if self . power != other . power { self . power . cmp ( & other . power ) } else { self . eth_address . cmp ( & other . eth_address ) . reverse ( ) } }
Alex wrote the Go sorting implementation for validator
sets as Greatest to Least, now this isn't the convention
for any standard sorting implementation and Rust doesn't
really like it when you implement sort yourself.
Alex wrote the Go sorting implementation for validator sets as Greatest to Least now this isn ' t the convention for any standard sorting implementation and Rust doesn ' t really like it when you implement sort yourself .
&self
other
&Self
&self
other
&Self