Runtime version (#256)

* Runtime version

* Updated genesis.wasm

* Minor fixes

* Fresh runtime

* Default version for pre Poc-2; Fixed authorship interface check

* Fixed authoring check
This commit is contained in:
Arkadiy Paronyan
2018-07-03 17:44:43 +02:00
committed by Gav Wood
parent c7067fa03a
commit 5e4ef36e40
15 changed files with 125 additions and 147 deletions
+7 -9
View File
@@ -240,7 +240,6 @@ pub struct ProposerFactory<C, N, P> {
impl<C, N, P> bft::ProposerFactory<Block> for ProposerFactory<C, N, P>
where
C: PolkadotApi + Send + Sync,
C::CheckedBlockId: Sync,
N: Network,
P: Collators,
{
@@ -254,9 +253,9 @@ impl<C, N, P> bft::ProposerFactory<Block> for ProposerFactory<C, N, P>
let parent_hash = parent_header.blake2_256().into();
let checked_id = self.client.check_id(BlockId::hash(parent_hash))?;
let duty_roster = self.client.duty_roster(&checked_id)?;
let random_seed = self.client.random_seed(&checked_id)?;
let id = BlockId::hash(parent_hash);
let duty_roster = self.client.duty_roster(&id)?;
let random_seed = self.client.random_seed(&id)?;
let (group_info, local_duty) = make_group_info(
duty_roster,
@@ -264,7 +263,7 @@ impl<C, N, P> bft::ProposerFactory<Block> for ProposerFactory<C, N, P>
sign_with.public().into(),
)?;
let active_parachains = self.client.active_parachains(&checked_id)?;
let active_parachains = self.client.active_parachains(&id)?;
let n_parachains = active_parachains.len();
let table = Arc::new(SharedTable::new(group_info, sign_with.clone(), parent_hash));
@@ -291,7 +290,7 @@ impl<C, N, P> bft::ProposerFactory<Block> for ProposerFactory<C, N, P>
local_duty,
local_key: sign_with,
parent_hash,
parent_id: checked_id,
parent_id: id,
parent_number: parent_header.number,
random_seed,
router,
@@ -315,7 +314,7 @@ pub struct Proposer<C: PolkadotApi, R, P> {
local_duty: LocalDuty,
local_key: Arc<ed25519::Pair>,
parent_hash: Hash,
parent_id: C::CheckedBlockId,
parent_id: BlockId,
parent_number: BlockNumber,
random_seed: Hash,
router: R,
@@ -326,7 +325,6 @@ pub struct Proposer<C: PolkadotApi, R, P> {
impl<C, R, P> bft::Proposer<Block> for Proposer<C, R, P>
where
C: PolkadotApi + Send + Sync,
C::CheckedBlockId: Sync,
R: TableRouter,
P: Collators,
{
@@ -621,7 +619,7 @@ impl ProposalTiming {
pub struct CreateProposal<C: PolkadotApi, R, P: Collators> {
parent_hash: Hash,
parent_number: BlockNumber,
parent_id: C::CheckedBlockId,
parent_id: BlockId,
client: Arc<C>,
transaction_pool: Arc<TransactionPool<C>>,
collation: CollationFetch<P, C>,