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

Commit 0f26a7d

Browse files
committed
Merge remote-tracking branch 'origin/master' into shawntabrizi-dispatchable-with-storage-layer
2 parents b0f7241 + 19b44f0 commit 0f26a7d

File tree

58 files changed

+1199
-640
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1199
-640
lines changed

Cargo.lock

Lines changed: 19 additions & 90 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bin/node/cli/tests/benchmark_machine_works.rs

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,16 @@ use std::process::Command;
2424
fn benchmark_machine_works() {
2525
let status = Command::new(cargo_bin("substrate"))
2626
.args(["benchmark", "machine", "--dev"])
27-
.args(["--verify-duration", "0.1", "--disk-duration", "0.1"])
27+
.args([
28+
"--verify-duration",
29+
"0.1",
30+
"--disk-duration",
31+
"0.1",
32+
"--memory-duration",
33+
"0.1",
34+
"--hash-duration",
35+
"0.1",
36+
])
2837
// Make it succeed.
2938
.args(["--allow-fail"])
3039
.status()
@@ -41,7 +50,18 @@ fn benchmark_machine_works() {
4150
fn benchmark_machine_fails_with_slow_hardware() {
4251
let output = Command::new(cargo_bin("substrate"))
4352
.args(["benchmark", "machine", "--dev"])
44-
.args(["--verify-duration", "0.1", "--disk-duration", "2", "--tolerance", "0"])
53+
.args([
54+
"--verify-duration",
55+
"1.0",
56+
"--disk-duration",
57+
"2",
58+
"--hash-duration",
59+
"1.0",
60+
"--memory-duration",
61+
"1.0",
62+
"--tolerance",
63+
"0",
64+
])
4565
.output()
4666
.unwrap();
4767

bin/node/runtime/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,7 @@ impl pallet_bags_list::Config for Runtime {
727727
parameter_types! {
728728
pub const PostUnbondPoolsWindow: u32 = 4;
729729
pub const NominationPoolsPalletId: PalletId = PalletId(*b"py/nopls");
730+
pub const MinPointsToBalance: u32 = 10;
730731
}
731732

732733
use sp_runtime::traits::Convert;
@@ -754,6 +755,7 @@ impl pallet_nomination_pools::Config for Runtime {
754755
type MaxMetadataLen = ConstU32<256>;
755756
type MaxUnbonding = ConstU32<8>;
756757
type PalletId = NominationPoolsPalletId;
758+
type MinPointsToBalance = MinPointsToBalance;
757759
}
758760

759761
parameter_types! {

client/beefy/rpc/src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,9 @@ where
146146
if let Some(mut sink) = pending.accept() {
147147
sink.pipe_from_stream(stream).await;
148148
}
149-
}
150-
.boxed();
149+
};
151150

152-
self.executor
153-
.spawn("substrate-rpc-subscription", Some("rpc"), fut.map(drop).boxed());
151+
self.executor.spawn("substrate-rpc-subscription", Some("rpc"), fut.boxed());
154152
}
155153

156154
async fn latest_finalized(&self) -> RpcResult<Block::Hash> {

client/consensus/babe/src/tests.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818

1919
//! BABE testsuite
2020
21-
// FIXME #2532: need to allow deprecated until refactor is done
22-
// https://github.com/paritytech/substrate/issues/2532
23-
#![allow(deprecated)]
2421
use super::*;
2522
use authorship::claim_slot;
2623
use futures::executor::block_on;

client/finality-grandpa/rpc/src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,9 @@ where
113113
if let Some(mut sink) = pending.accept() {
114114
sink.pipe_from_stream(stream).await;
115115
}
116-
}
117-
.boxed();
116+
};
118117

119-
self.executor
120-
.spawn("substrate-rpc-subscription", Some("rpc"), fut.map(drop).boxed());
118+
self.executor.spawn("substrate-rpc-subscription", Some("rpc"), fut.boxed());
121119
}
122120

123121
async fn prove_finality(

client/rpc/src/author/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,8 @@ where
210210
};
211211

212212
sink.pipe_from_stream(stream).await;
213-
}
214-
.boxed();
213+
};
215214

216-
self.executor
217-
.spawn("substrate-rpc-subscription", Some("rpc"), fut.map(drop).boxed());
215+
self.executor.spawn("substrate-rpc-subscription", Some("rpc"), fut.boxed());
218216
}
219217
}

client/rpc/src/chain/chain_full.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,7 @@ fn subscribe_headers<Block, Client, F, G, S>(
147147
if let Some(mut sink) = pending.accept() {
148148
sink.pipe_from_stream(stream).await;
149149
}
150-
}
151-
.boxed();
150+
};
152151

153-
executor.spawn("substrate-rpc-subscription", Some("rpc"), fut.map(drop).boxed());
152+
executor.spawn("substrate-rpc-subscription", Some("rpc"), fut.boxed());
154153
}

client/rpc/src/state/state_full.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -404,11 +404,9 @@ where
404404
if let Some(mut sink) = pending.accept() {
405405
sink.pipe_from_stream(stream).await;
406406
}
407-
}
408-
.boxed();
407+
};
409408

410-
self.executor
411-
.spawn("substrate-rpc-subscription", Some("rpc"), fut.map(drop).boxed());
409+
self.executor.spawn("substrate-rpc-subscription", Some("rpc"), fut.boxed());
412410
}
413411

414412
fn subscribe_storage(&self, pending: PendingSubscription, keys: Option<Vec<StorageKey>>) {
@@ -451,11 +449,9 @@ where
451449
if let Some(mut sink) = pending.accept() {
452450
sink.pipe_from_stream(stream).await;
453451
}
454-
}
455-
.boxed();
452+
};
456453

457-
self.executor
458-
.spawn("substrate-rpc-subscription", Some("rpc"), fut.map(drop).boxed());
454+
self.executor.spawn("substrate-rpc-subscription", Some("rpc"), fut.boxed());
459455
}
460456

461457
async fn trace_block(

0 commit comments

Comments
 (0)