Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
polkadot
Commits
d4379e79
Commit
d4379e79
authored
Jul 14, 2018
by
Arkadiy Paronyan
Committed by
Gav Wood
Jul 14, 2018
Browse files
Fixed a few authoring issues (#315)
parent
677e32ff
Changes
6
Hide whitespace changes
Inline
Side-by-side
network/src/consensus.rs
View file @
d4379e79
...
...
@@ -198,7 +198,7 @@ impl<P: LocalPolkadotApi + Send + Sync + 'static> Future for MessageProcessTask<
return
Ok
(
async
);
},
Ok
(
Async
::
Ready
(
None
))
=>
return
Ok
(
Async
::
Ready
(())),
Ok
(
Async
::
NotReady
)
=>
(
),
Ok
(
Async
::
NotReady
)
=>
return
Ok
(
Async
::
NotReady
),
Err
(
e
)
=>
debug!
(
target
:
"p_net"
,
"Error getting consensus message: {:?}"
,
e
),
}
}
...
...
runtime/wasm/genesis.wasm
View file @
d4379e79
No preview for this file type
runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.compact.wasm
View file @
d4379e79
No preview for this file type
runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.wasm
View file @
d4379e79
No preview for this file type
service/Cargo.toml
View file @
d4379e79
...
...
@@ -19,7 +19,6 @@ polkadot-executor = { path = "../executor" }
polkadot-api
=
{
path
=
"../api"
}
polkadot-transaction-pool
=
{
path
=
"../transaction-pool"
}
polkadot-network
=
{
path
=
"../network"
}
substrate-keystore
=
{
path
=
"../../substrate/keystore"
}
substrate-runtime-io
=
{
path
=
"../../substrate/runtime-io"
}
substrate-primitives
=
{
path
=
"../../substrate/primitives"
}
substrate-network
=
{
path
=
"../../substrate/network"
}
...
...
service/src/lib.rs
View file @
d4379e79
...
...
@@ -26,7 +26,6 @@ extern crate polkadot_api;
extern
crate
polkadot_consensus
as
consensus
;
extern
crate
polkadot_transaction_pool
as
transaction_pool
;
extern
crate
polkadot_network
;
extern
crate
substrate_keystore
as
keystore
;
extern
crate
substrate_primitives
as
primitives
;
extern
crate
substrate_network
as
network
;
extern
crate
substrate_codec
as
codec
;
...
...
@@ -46,7 +45,6 @@ use std::collections::HashMap;
use
codec
::
Slicable
;
use
transaction_pool
::
TransactionPool
;
use
keystore
::
Store
as
Keystore
;
use
polkadot_api
::{
PolkadotApi
,
light
::
RemotePolkadotApiWrapper
};
use
polkadot_primitives
::{
Block
,
BlockId
,
Hash
};
use
polkadot_runtime
::
GenesisConfig
;
...
...
@@ -168,14 +166,12 @@ pub fn new_light(config: Configuration<GenesisConfig>, executor: TaskExecutor)
pub
fn
new_full
(
config
:
Configuration
<
GenesisConfig
>
,
executor
:
TaskExecutor
)
->
Result
<
Service
<
FullComponents
<
Factory
>>
,
Error
>
{
let
keystore_path
=
config
.keystore_path
.clone
();
let
is_validator
=
(
config
.roles
&
Role
::
AUTHORITY
)
==
Role
::
AUTHORITY
;
let
service
=
service
::
Service
::
<
FullComponents
<
Factory
>>
::
new
(
config
,
executor
.clone
())
?
;
// Spin consensus service if configured
let
consensus
=
if
is_validator
{
// Spin consensus service if configured
let
keystore
=
Keystore
::
open
(
keystore_path
.into
())
?
;
// Load the first available key
let
key
=
keystore
.load
(
&
keystore
.contents
()
?
[
0
],
""
)
?
;
let
key
=
service
.
keystore
()
.load
(
&
service
.
keystore
()
.contents
()
?
[
0
],
""
)
?
;
info!
(
"Using authority key {}"
,
key
.public
());
let
client
=
service
.client
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment