Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
5f6bb70
grandpa: wire up basic RPC call
octol Apr 1, 2020
4ef39fa
grandpa: make it compile against GRANDPA with expose round state
andresilva Apr 1, 2020
eea294d
grandpa: use shared voter state to expose RPC endpoint
octol Apr 7, 2020
a8109a2
grandpa: restructure into nested structs
octol Apr 7, 2020
04fca7e
grandpa: return background rounds too
octol Apr 8, 2020
627c7a8
grandpa: return error when endpoint not ready
octol Apr 8, 2020
123e249
grandpa: collect grandpa rpc deps
octol Apr 8, 2020
10b3266
grandpa: decide to use concrete AuthorityId in finality-grandpa-rpc
octol Apr 17, 2020
eb5d87d
grandpa: remove unncessary type annotation
octol Apr 23, 2020
6edfa13
grandpa: move error code to const
octol Apr 23, 2020
bcb206d
grandpa: remove unnecessary WIP comment
octol Apr 23, 2020
4ca212d
grandpa: remove Id type parameter for SharedVoterState
octol Apr 23, 2020
b2af4f7
grandpa: update tests to add shared_voter_state in parameters
octol Apr 23, 2020
b04616f
grandpa: remove old deprecated test
octol Apr 23, 2020
c9bcbf8
grandpa: fix getting the correct set_id
octol Apr 24, 2020
fedfdcc
grandpa: make SharedVoterState a struct
octol Apr 24, 2020
4e75855
grandpa: wrap shared_voter_state in rpc_setup
octol Apr 24, 2020
f4140b6
grandpa: replace spaces with tabs
octol Apr 24, 2020
7586652
grandpa: limit RwLock write attempt to 1 sec
octol Apr 24, 2020
3d6f1c2
grandpa: add missing doc comments and remove some pub
octol Apr 27, 2020
4872fcb
Apply suggestions from code review
Demi-Marie Apr 28, 2020
75efc8e
grandpa: update function name call after change in finality-grandpa
octol Apr 29, 2020
26b0959
grandpa: group pub use and only export voter::report
octol Apr 29, 2020
9c55fa5
grandpa: add missing docs
octol Apr 29, 2020
d636c28
grandpa: extract out structs used for json serialization
octol Apr 29, 2020
e63c3be
grandpa: stick to u32 for fields intended for js
octol Apr 29, 2020
c02211c
grandpa: move Error type to its own file
octol Apr 29, 2020
fef11d3
grandpa: group pub use better
octol Apr 30, 2020
f1c2103
Apply code review suggestion
octol Apr 30, 2020
bc68092
Merge 'upstream/master' into jon/issue-4921-expose-grandpa-round-stat…
octol Apr 30, 2020
b809ee1
grandpa: use correct version of finality-granpda in rpc crate
octol Apr 30, 2020
988bbee
grandpa: add back basic rpc unit test
octol Apr 29, 2020
f9d9b1c
grandpa: replace SharedVoterState::new() with empty()
andresilva Apr 30, 2020
9eb5fa3
node: cleanup grandpa::SharedVoterState usage in macro
andresilva Apr 30, 2020
12004bc
grandpa: remove VoterState error variant
andresilva Apr 30, 2020
1ef01df
grandpa: enable missing futures compat feature
andresilva Apr 30, 2020
a97bb87
grandpa: fix typo in error variant
andresilva May 1, 2020
7aed9bb
grandpa: remove test_utils
andresilva May 1, 2020
65f8674
grandpa: allow mocking rpc handler components
andresilva May 1, 2020
a3e477d
grandpa: rename serialized to report in rpc module
andresilva May 1, 2020
23536a0
grandpa: add proper test for RPC
andresilva May 1, 2020
aabacb8
grandpa: update to finality-grandpa v0.12.1
andresilva May 1, 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
Prev Previous commit
Next Next commit
grandpa: update tests to add shared_voter_state in parameters
  • Loading branch information
octol committed Apr 27, 2020
commit b2af4f7332fba3b0f66eed20bc49caecda878c44
7 changes: 5 additions & 2 deletions client/finality-grandpa/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,6 @@ fn run_to_completion_with<F>(
) -> u64 where
F: FnOnce(Handle) -> Option<Pin<Box<dyn Future<Output = ()>>>>
{
use parking_lot::RwLock;

let mut wait_for = Vec::new();

let highest_finalized = Arc::new(RwLock::new(0));
Expand Down Expand Up @@ -354,6 +352,7 @@ fn run_to_completion_with<F>(
telemetry_on_connect: None,
voting_rule: (),
prometheus_registry: None,
shared_voter_state: Arc::new(parking_lot::RwLock::new(None)),
};
let voter = run_grandpa_voter(grandpa_params).expect("all in order with client and network");

Expand Down Expand Up @@ -485,6 +484,7 @@ fn finalize_3_voters_1_full_observer() {
telemetry_on_connect: None,
voting_rule: (),
prometheus_registry: None,
shared_voter_state: Arc::new(parking_lot::RwLock::new(None)),
};

voters.push(run_grandpa_voter(grandpa_params).expect("all in order with client and network"));
Expand Down Expand Up @@ -648,6 +648,7 @@ fn transition_3_voters_twice_1_full_observer() {
telemetry_on_connect: None,
voting_rule: (),
prometheus_registry: None,
shared_voter_state: Arc::new(parking_lot::RwLock::new(None)),
};
let voter = run_grandpa_voter(grandpa_params).expect("all in order with client and network");

Expand Down Expand Up @@ -1073,6 +1074,7 @@ fn voter_persists_its_votes() {
telemetry_on_connect: None,
voting_rule: VotingRulesBuilder::default().build(),
prometheus_registry: None,
shared_voter_state: Arc::new(parking_lot::RwLock::new(None)),
};

let voter = run_grandpa_voter(grandpa_params)
Expand Down Expand Up @@ -1418,6 +1420,7 @@ fn voter_catches_up_to_latest_round_when_behind() {
telemetry_on_connect: None,
voting_rule: (),
prometheus_registry: None,
shared_voter_state: Arc::new(parking_lot::RwLock::new(None)),
};

Box::pin(run_grandpa_voter(grandpa_params).expect("all in order with client and network"))
Expand Down