Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
dca7ce3
Fix import
expenses Oct 7, 2020
21f7e45
Add custom decode impl
expenses Oct 7, 2020
3ab6abb
Remove serialization tests
expenses Oct 8, 2020
8cd0640
Use while pop
expenses Oct 8, 2020
c54b5e0
Merge remote-tracking branch 'origin/master' into ashley-fork-tree
expenses Oct 8, 2020
8286729
Remvoe decode
expenses Oct 8, 2020
de8b504
Does this work??
expenses Oct 8, 2020
6a0c36c
Add find_index_where tests
expenses Oct 16, 2020
b09ea8d
Merge branch 'ashley-fork-tree-in-prog' into ashley-fork-tree-only-im…
expenses Oct 16, 2020
12b8598
Might be working
expenses Oct 16, 2020
d7f8448
Fingers crossed!
expenses Oct 16, 2020
c7d405f
Add more tests
expenses Oct 16, 2020
490b393
Tidy up a little
expenses Oct 19, 2020
9b3232c
Merge branch 'ashley-fork-tree-maybe-working' into ashley-fork-tree-i…
expenses Oct 19, 2020
f30d406
Merge remote-tracking branch 'origin/master' into ashley-fork-tree-in…
expenses Oct 19, 2020
ca7fe7f
Add special case
expenses Oct 19, 2020
5dbbf43
Merge branch 'ashley-fork-tree-maybe-working' into ashley-fork-tree-i…
expenses Oct 19, 2020
04c782d
Merge remote-tracking branch 'origin/master' into ashley-fork-tree-in…
expenses Oct 21, 2020
c806690
Add custom decode impl
expenses Oct 22, 2020
ae0bf0f
Merge remote-tracking branch 'origin/master' into ashley-fork-tree-in…
expenses Oct 22, 2020
18ae80b
Merge remote-tracking branch 'origin/master' into ashley-fork-tree-in…
expenses Oct 26, 2020
8777783
Fix line widths
expenses Oct 26, 2020
76d6688
Add values to default test fork tree
expenses Oct 27, 2020
9cf44e0
Switch to alternate implementations
expenses Oct 27, 2020
f21a332
Merge remote-tracking branch 'origin/master' into ashley-fork-tree-in…
expenses Oct 27, 2020
89c9b21
Fix sc-consensus-epochs and sc-finality-grandpa
expenses Oct 27, 2020
cc5baf3
Update test values
expenses Oct 27, 2020
c441b61
Apply suggestions from code review
expenses Nov 4, 2020
706df68
Merge remote-tracking branch 'origin/master' into ashley-fork-tree-in…
expenses Nov 4, 2020
d5046fa
Write out decode proofs
expenses Nov 4, 2020
14dd951
Add decoding test
expenses Nov 4, 2020
fa18a1a
Fix grandpa test :D
expenses Nov 9, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client/consensus/epochs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ fn fake_head_hash<H: AsRef<[u8]> + AsMut<[u8]> + Clone>(parent_hash: &H) -> H {
}

impl<Hash, Number, E: Epoch> Default for EpochChanges<Hash, Number, E> where
Hash: PartialEq + Ord,
Hash: Eq + Ord + Clone + std::hash::Hash,
Number: Ord,
{
fn default() -> Self {
Expand All @@ -321,7 +321,7 @@ impl<Hash, Number, E: Epoch> Default for EpochChanges<Hash, Number, E> where
}

impl<Hash, Number, E: Epoch> EpochChanges<Hash, Number, E> where
Hash: PartialEq + Ord + AsRef<[u8]> + AsMut<[u8]> + Copy,
Hash: Eq + Ord + AsRef<[u8]> + AsMut<[u8]> + Copy + std::hash::Hash,
Number: Ord + One + Zero + Add<Output=Number> + Copy,
{
/// Create a new epoch change.
Expand Down
2 changes: 1 addition & 1 deletion client/consensus/epochs/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub struct EpochChangesV0<Hash, Number, E: Epoch> {
pub type EpochChangesForV0<Block, Epoch> = EpochChangesV0<<Block as BlockT>::Hash, NumberFor<Block>, Epoch>;

impl<Hash, Number, E: Epoch> EpochChangesV0<Hash, Number, E> where
Hash: PartialEq + Ord + Copy,
Hash: Eq + Ord + Copy + std::hash::Hash,
Number: Ord + Copy,
{
/// Create a new value of this type from raw.
Expand Down
3 changes: 2 additions & 1 deletion client/finality-grandpa/rpc/src/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use std::{
collections::{BTreeSet, HashSet},
fmt::Debug,
ops::Add,
hash::Hash,
};

use serde::{Deserialize, Serialize};
Expand All @@ -41,7 +42,7 @@ pub trait ReportVoterState {
impl<H, N> ReportAuthoritySet for SharedAuthoritySet<H, N>
where
N: Add<Output = N> + Ord + Clone + Debug,
H: Clone + Debug + Eq,
H: Clone + Debug + Eq + Hash,
{
fn get(&self) -> (u64, HashSet<AuthorityId>) {
let current_voters: HashSet<AuthorityId> = self
Expand Down
11 changes: 6 additions & 5 deletions client/finality-grandpa/src/authorities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ use std::cmp::Ord;
use std::fmt::Debug;
use std::ops::Add;
use std::sync::Arc;
use std::hash::Hash;

/// Error type returned on operations on the `AuthoritySet`.
#[derive(Debug, derive_more::Display)]
Expand Down Expand Up @@ -88,7 +89,7 @@ impl<H, N> SharedAuthoritySet<H, N> {

impl<H: Eq, N> SharedAuthoritySet<H, N>
where N: Add<Output=N> + Ord + Clone + Debug,
H: Clone + Debug
H: Clone + Debug + Hash,
{
/// Get the earliest limit-block number that's higher or equal to the given
/// min number, if any.
Expand Down Expand Up @@ -156,7 +157,7 @@ pub struct AuthoritySet<H, N> {

impl<H, N> AuthoritySet<H, N>
where
H: PartialEq,
H: Eq + Hash + Clone,
N: Ord,
{
// authority sets must be non-empty and all weights must be greater than 0
Expand Down Expand Up @@ -206,7 +207,7 @@ where
impl<H: Eq, N> AuthoritySet<H, N>
where
N: Add<Output = N> + Ord + Clone + Debug,
H: Clone + Debug,
H: Clone + Debug + Hash,
{
/// Returns the block hash and height at which the next pending change in
/// the given chain (i.e. it includes `best_hash`) was signalled, `None` if
Expand Down Expand Up @@ -793,8 +794,8 @@ mod tests {
delay_kind: DelayKind::Finalized,
};

authorities.add_pending_change(change_a.clone(), &static_is_descendent_of(true)).unwrap();
authorities.add_pending_change(change_b.clone(), &static_is_descendent_of(true)).unwrap();
authorities.add_pending_change(change_a.clone(), &static_is_descendent_of(false)).unwrap();
authorities.add_pending_change(change_b.clone(), &static_is_descendent_of(false)).unwrap();

assert_eq!(
authorities.pending_changes().collect::<Vec<_>>(),
Expand Down
3 changes: 2 additions & 1 deletion client/finality-grandpa/src/aux_schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

use std::fmt::Debug;
use std::sync::Arc;
use std::hash::Hash;
use parity_scale_codec::{Encode, Decode};
use sc_client_api::backend::AuxStore;
use sp_blockchain::{Result as ClientResult, Error as ClientError};
Expand Down Expand Up @@ -70,7 +71,7 @@ struct V0AuthoritySet<H, N> {
}

impl<H, N> Into<AuthoritySet<H, N>> for V0AuthoritySet<H, N>
where H: Clone + Debug + PartialEq,
where H: Clone + Debug + Eq + Hash,
N: Clone + Debug + Ord,
{
fn into(self) -> AuthoritySet<H, N> {
Expand Down
Loading