Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
482a074
reshuffle consensus libraries
rphmeier Feb 8, 2018
917b092
polkadot-useful type definitions for statement table
rphmeier Feb 8, 2018
8e2fd3c
begin BftService
rphmeier Feb 10, 2018
776cf13
Merge branch 'master' into rh-split-bft-table
rphmeier Feb 10, 2018
6abfed4
primary selection logic
rphmeier Feb 12, 2018
fc18524
bft service implementation without I/O
rphmeier Feb 12, 2018
017fd51
extract out `BlockImport` trait
rphmeier Feb 12, 2018
25990ee
Merge branch 'master' into rh-split-bft-table
rphmeier Feb 12, 2018
c33c3ff
allow bft primitives to compile on wasm
rphmeier Feb 12, 2018
acab9a3
Block builder (substrate)
gavofyork Feb 12, 2018
1830fa7
take polkadot-consensus down to the core.
rphmeier Feb 12, 2018
767a9d9
test for preemption
rphmeier Feb 12, 2018
7fc4b4d
fix test build
rphmeier Feb 12, 2018
9acd3f9
Fix wasm build
gavofyork Feb 12, 2018
ca5900f
Bulid on any block
gavofyork Feb 13, 2018
d11cfe1
Test for block builder.
gavofyork Feb 13, 2018
b973ccc
Block import tests for client.
gavofyork Feb 13, 2018
ec61865
Tidy ups
gavofyork Feb 13, 2018
23638cd
clean up block builder instantiation
rphmeier Feb 15, 2018
dda6d24
Merge branch 'rh-split-bft-table' into rh-justification-verification
rphmeier Feb 15, 2018
340ce39
justification verification logic
rphmeier Feb 15, 2018
170b0d1
JustifiedHeader and import
rphmeier Feb 15, 2018
6a1a851
Propert block generation for tests
arkpar Feb 15, 2018
a1247bd
Fixed rpc tests
arkpar Feb 15, 2018
673fc2c
Merge branch 'master' into rh-justification-verification
rphmeier Feb 15, 2018
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
Fixed rpc tests
  • Loading branch information
arkpar committed Feb 15, 2018
commit a1247bd0608e9ee40932cbbf48257080ab6532fe
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions substrate/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ substrate-executor = { path = "../executor" }
[dev-dependencies]
assert_matches = "1.1"
substrate-executor = { path = "../executor" }
substrate-runtime-support = { path = "../runtime-support" }
3 changes: 2 additions & 1 deletion substrate/rpc/src/chain/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

use substrate_executor as executor;
use client;
use runtime_support::Hashable;
use super::*;

#[test]
Expand All @@ -31,7 +32,7 @@ fn should_return_header() {
let client = client::new_in_mem(executor::WasmExecutor, || (test_genesis_block.clone(), vec![])).unwrap();

assert_matches!(
ChainApi::header(&client, "af65e54217fb213853703d57b80fc5b2bb834bf923046294d7a49bff62f0a8b2".into()),
ChainApi::header(&client, test_genesis_block.blake2_256().into()),
Ok(Some(ref x)) if x == &block::Header {
parent_hash: 0.into(),
number: 0,
Expand Down
2 changes: 2 additions & 0 deletions substrate/rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ extern crate substrate_executor;
#[cfg(test)]
#[macro_use]
extern crate assert_matches;
#[cfg(test)]
extern crate substrate_runtime_support as runtime_support;

pub mod chain;
pub mod state;
5 changes: 3 additions & 2 deletions substrate/rpc/src/state/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use super::*;
use substrate_executor as executor;
use self::error::{Error, ErrorKind};
use runtime_support::Hashable;
use client;

#[test]
Expand All @@ -30,7 +31,7 @@ fn should_return_storage() {
};

let client = client::new_in_mem(executor::WasmExecutor, || (test_genesis_block.clone(), vec![])).unwrap();
let genesis_hash = "af65e54217fb213853703d57b80fc5b2bb834bf923046294d7a49bff62f0a8b2".into();
let genesis_hash = test_genesis_block.blake2_256().into();

assert_matches!(
StateApi::storage(&client, StorageKey(vec![10]), genesis_hash),
Expand All @@ -51,7 +52,7 @@ fn should_call_contract() {
};

let client = client::new_in_mem(executor::WasmExecutor, || (test_genesis_block.clone(), vec![])).unwrap();
let genesis_hash = "af65e54217fb213853703d57b80fc5b2bb834bf923046294d7a49bff62f0a8b2".into();
let genesis_hash = test_genesis_block.blake2_256().into();

assert_matches!(
StateApi::call(&client, "balanceOf".into(), vec![1,2,3], genesis_hash),
Expand Down