Skip to content

Commit 14542fd

Browse files
committed
Merge branch 'devnet-ready' into fix-utility-weight-mismatch
2 parents 92f4b99 + 2c51598 commit 14542fd

Some content is hidden

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

67 files changed

+2108
-477
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ edition = "2024"
4040

4141
[workspace.lints.clippy]
4242
arithmetic-side-effects = "deny"
43+
expect-used = "deny"
4344
indexing-slicing = "deny"
4445
manual_inspect = "allow"
4546
result_large_err = "allow"
@@ -91,6 +92,9 @@ serde_bytes = { version = "0.11.14", default-features = false }
9192
serde_json = { version = "1.0.141", default-features = false }
9293
serde_with = { version = "3.14.0", default-features = false }
9394
smallvec = "1.13.2"
95+
tracing = "0.1"
96+
tracing-log = "0.2"
97+
tracing-subscriber = { version = "0.3" }
9498
litep2p = { git = "https://github.com/paritytech/litep2p", tag = "v0.7.0", default-features = false }
9599
syn = { version = "2.0.106", default-features = false }
96100
quote = { version = "1", default-features = false }

node/src/benchmarking.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ impl frame_benchmarking_cli::ExtrinsicBuilder for TransferKeepAliveBuilder {
105105
// Create a transaction using the given `call`.
106106
//
107107
// Note: Should only be used for benchmarking.
108+
#[allow(clippy::expect_used)]
108109
pub fn create_benchmark_extrinsic(
109110
client: &FullClient,
110111
sender: sp_core::sr25519::Pair,

node/src/chain_spec/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Allowed since it's actually better to panic during chain setup when there is an error
2-
#![allow(clippy::unwrap_used)]
2+
#![allow(clippy::expect_used, clippy::unwrap_used)]
33

44
pub mod devnet;
55
pub mod finney;

node/src/command.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ pub fn run() -> sc_cli::Result<()> {
245245
}
246246
}
247247

248+
#[allow(clippy::expect_used)]
248249
fn start_babe_service(arg_matches: &ArgMatches) -> Result<(), sc_cli::Error> {
249250
let cli = Cli::from_arg_matches(arg_matches).expect("Bad arg_matches");
250251
let runner = cli.create_runner(&cli.run)?;
@@ -281,6 +282,7 @@ fn start_babe_service(arg_matches: &ArgMatches) -> Result<(), sc_cli::Error> {
281282
}
282283
}
283284

285+
#[allow(clippy::expect_used)]
284286
fn start_aura_service(arg_matches: &ArgMatches) -> Result<(), sc_cli::Error> {
285287
let cli = Cli::from_arg_matches(arg_matches).expect("Bad arg_matches");
286288
let runner = cli.create_runner(&cli.run)?;
@@ -313,6 +315,7 @@ fn start_aura_service(arg_matches: &ArgMatches) -> Result<(), sc_cli::Error> {
313315
}
314316
}
315317

318+
#[allow(clippy::expect_used)]
316319
fn customise_config(arg_matches: &ArgMatches, config: Configuration) -> Configuration {
317320
let cli = Cli::from_arg_matches(arg_matches).expect("Bad arg_matches");
318321

node/src/consensus/babe_consensus.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ impl ConsensusMechanism for BabeConsensus {
4444
sp_timestamp::InherentDataProvider,
4545
);
4646

47+
#[allow(clippy::expect_used)]
4748
fn start_authoring<C, SC, I, PF, SO, L, CIDP, BS, Error>(
4849
self,
4950
task_manager: &mut TaskManager,

node/src/consensus/hybrid_import_queue.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ impl HybridBlockImport {
7777
FrontierBlockImport::new(grandpa_block_import.clone(), client.clone()),
7878
);
7979

80+
#[allow(clippy::expect_used)]
8081
let (babe_import, babe_link) = sc_consensus_babe::block_import(
8182
babe_config,
8283
grandpa_block_import.clone(),

node/src/service.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ pub type BIQ<'a> = Box<
6060
+ 'a,
6161
>;
6262

63+
#[allow(clippy::expect_used)]
6364
pub fn new_partial(
6465
config: &Configuration,
6566
eth_config: &EthConfiguration,
@@ -250,6 +251,7 @@ pub fn build_manual_seal_import_queue(
250251
}
251252

252253
/// Builds a new service for a full client.
254+
#[allow(clippy::expect_used)]
253255
pub async fn new_full<NB, CM>(
254256
mut config: Configuration,
255257
eth_config: EthConfiguration,

pallets/admin-utils/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ mod tests;
1818

1919
#[deny(missing_docs)]
2020
#[frame_support::pallet]
21+
#[allow(clippy::expect_used)]
2122
pub mod pallet {
2223
use super::*;
2324
use frame_support::pallet_prelude::*;
@@ -162,6 +163,8 @@ pub mod pallet {
162163
/// Dispatchable functions allows users to interact with the pallet and invoke state changes.
163164
#[pallet::call]
164165
impl<T: Config> Pallet<T> {
166+
#![deny(clippy::expect_used)]
167+
165168
/// The extrinsic sets the new authorities for Aura consensus.
166169
/// It is only callable by the root account.
167170
/// The extrinsic will call the Aura pallet to change the authorities.
@@ -731,7 +734,7 @@ pub mod pallet {
731734
/// It is only callable by the root account.
732735
/// The extrinsic will call the Subtensor pallet to set the target registrations per interval.
733736
#[pallet::call_index(21)]
734-
#[pallet::weight(Weight::from_parts(44_320_000, 0)
737+
#[pallet::weight(Weight::from_parts(25_980_000, 0)
735738
.saturating_add(<T as frame_system::Config>::DbWeight::get().reads(3_u64))
736739
.saturating_add(<T as frame_system::Config>::DbWeight::get().writes(1_u64)))]
737740
pub fn sudo_set_target_registrations_per_interval(

pallets/collective/src/benchmarking.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616
// limitations under the License.
1717

1818
//! Staking pallet benchmarking.
19-
#![allow(clippy::arithmetic_side_effects, clippy::indexing_slicing)]
19+
#![allow(
20+
clippy::arithmetic_side_effects,
21+
clippy::expect_used,
22+
clippy::indexing_slicing
23+
)]
2024

2125
use super::*;
2226
use crate::Pallet as Collective;

0 commit comments

Comments
 (0)