mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-16 16:41:10 +00:00
remove unused context trait and fix warning
This commit is contained in:
@@ -22,18 +22,6 @@ use std::hash::Hash;
|
||||
|
||||
use super::{Message, LocalizedMessage};
|
||||
|
||||
/// Context necessary to execute a round of BFT.
|
||||
pub trait Context {
|
||||
/// A full candidate.
|
||||
type Candidate: Clone;
|
||||
/// Unique digest of a proposed candidate (think hash).
|
||||
type Digest: Hash + Eq + Clone;
|
||||
/// Validator ID.
|
||||
type ValidatorId: Hash + Eq;
|
||||
/// A signature.
|
||||
type Signature: Eq + Clone;
|
||||
}
|
||||
|
||||
/// Justification at a given round.
|
||||
#[derive(PartialEq, Eq, Debug, Clone)]
|
||||
pub struct Justification<D, S> {
|
||||
|
||||
@@ -284,7 +284,7 @@ impl<C: Context> Table<C> {
|
||||
let candidate = &candidate_data.candidate;
|
||||
match best_candidates.entry(group_id.clone()) {
|
||||
BTreeEntry::Occupied(mut occ) => {
|
||||
let mut candidate_ref = occ.get_mut();
|
||||
let candidate_ref = occ.get_mut();
|
||||
if *candidate_ref < candidate {
|
||||
*candidate_ref = candidate;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user