Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit e532b7b

Browse files
committed
Fixed a few authoring issues
1 parent 62b2832 commit e532b7b

File tree

18 files changed

+15
-12
lines changed

18 files changed

+15
-12
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/executor/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,15 +335,15 @@ mod tests {
335335
fn native_big_block_import_succeeds() {
336336
let mut t = new_test_ext();
337337

338-
let r = Executor::new().call(&mut t, COMPACT_CODE, "execute_block", &block1big().0, true).0;
338+
let r = Executor::with_heap_pages(8).call(&mut t, COMPACT_CODE, "execute_block", &block1big().0, true).0;
339339
assert!(r.is_ok());
340340
}
341341

342342
#[test]
343343
fn native_big_block_import_fails_on_fallback() {
344344
let mut t = new_test_ext();
345345

346-
let r = Executor::new().call(&mut t, COMPACT_CODE, "execute_block", &block1big().0, false).0;
346+
let r = Executor::with_heap_pages(8).call(&mut t, COMPACT_CODE, "execute_block", &block1big().0, false).0;
347347
assert!(!r.is_ok());
348348
}
349349

Binary file not shown.
Binary file not shown.

polkadot/network/src/consensus.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ impl<P: LocalPolkadotApi + Send + Sync + 'static> Future for MessageProcessTask<
198198
return Ok(async);
199199
},
200200
Ok(Async::Ready(None)) => return Ok(Async::Ready(())),
201-
Ok(Async::NotReady) => (),
201+
Ok(Async::NotReady) => return Ok(Async::NotReady),
202202
Err(e) => debug!(target: "p_net", "Error getting consensus message: {:?}", e),
203203
}
204204
}

polkadot/runtime/wasm/genesis.wasm

141 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

polkadot/service/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ polkadot-executor = { path = "../executor" }
1919
polkadot-api = { path = "../api" }
2020
polkadot-transaction-pool = { path = "../transaction-pool" }
2121
polkadot-network = { path = "../network" }
22-
substrate-keystore = { path = "../../substrate/keystore" }
2322
substrate-runtime-io = { path = "../../substrate/runtime-io" }
2423
substrate-primitives = { path = "../../substrate/primitives" }
2524
substrate-network = { path = "../../substrate/network" }

polkadot/service/src/lib.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ extern crate polkadot_api;
2626
extern crate polkadot_consensus as consensus;
2727
extern crate polkadot_transaction_pool as transaction_pool;
2828
extern crate polkadot_network;
29-
extern crate substrate_keystore as keystore;
3029
extern crate substrate_primitives as primitives;
3130
extern crate substrate_network as network;
3231
extern crate substrate_codec as codec;
@@ -46,7 +45,6 @@ use std::collections::HashMap;
4645

4746
use codec::Slicable;
4847
use transaction_pool::TransactionPool;
49-
use keystore::Store as Keystore;
5048
use polkadot_api::{PolkadotApi, light::RemotePolkadotApiWrapper};
5149
use polkadot_primitives::{Block, BlockId, Hash};
5250
use polkadot_runtime::GenesisConfig;
@@ -168,14 +166,12 @@ pub fn new_light(config: Configuration<GenesisConfig>, executor: TaskExecutor)
168166
pub fn new_full(config: Configuration<GenesisConfig>, executor: TaskExecutor)
169167
-> Result<Service<FullComponents<Factory>>, Error>
170168
{
171-
let keystore_path = config.keystore_path.clone();
172169
let is_validator = (config.roles & Role::AUTHORITY) == Role::AUTHORITY;
173170
let service = service::Service::<FullComponents<Factory>>::new(config, executor.clone())?;
171+
// Spin consensus service if configured
174172
let consensus = if is_validator {
175-
// Spin consensus service if configured
176-
let keystore = Keystore::open(keystore_path.into())?;
177173
// Load the first available key
178-
let key = keystore.load(&keystore.contents()?[0], "")?;
174+
let key = service.keystore().load(&service.keystore().contents()?[0], "")?;
179175
info!("Using authority key {}", key.public());
180176

181177
let client = service.client();

0 commit comments

Comments
 (0)