Skip to content

Commit

Permalink
Revert "".git/.scripts/commands/fmt/fmt.sh""
Browse files Browse the repository at this point in the history
This reverts commit d50a36d.
  • Loading branch information
bkchr committed Nov 5, 2024
1 parent d50a36d commit e42b72c
Show file tree
Hide file tree
Showing 53 changed files with 140 additions and 217 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -664,8 +664,7 @@ impl<'a, P: SubstrateParachainsPipeline, SourceRelayClnt, TargetClnt>
for (
&'a OnDemandParachainsRelay<P, SourceRelayClnt, TargetClnt>,
&'a ParachainsSource<P, SourceRelayClnt>,
)
where
) where
SourceRelayClnt: Client<P::SourceRelayChain>,
TargetClnt: Client<P::TargetChain>,
{
Expand Down
6 changes: 2 additions & 4 deletions bridges/relays/messages/src/message_race_strategy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ impl<
TargetHeaderHash,
SourceNoncesRange,
Proof,
>
where
> where
SourceHeaderHash: Clone,
SourceHeaderNumber: Clone + Ord,
SourceNoncesRange: NoncesRange,
Expand Down Expand Up @@ -190,8 +189,7 @@ impl<
TargetHeaderHash,
SourceNoncesRange,
Proof,
>
where
> where
SourceHeaderHash: Clone + Debug + Send + Sync,
SourceHeaderNumber: Clone + Ord + Debug + Send + Sync,
SourceNoncesRange: NoncesRange + Debug + Send + Sync,
Expand Down
3 changes: 1 addition & 2 deletions bridges/snowbridge/primitives/router/src/inbound/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ impl<CreateAssetCall, CreateAssetDeposit, InboundQueuePalletInstance, AccountId,
InboundQueuePalletInstance,
AccountId,
Balance,
>
where
> where
CreateAssetCall: Get<CallIndex>,
CreateAssetDeposit: Get<u128>,
InboundQueuePalletInstance: Get<u8>,
Expand Down
3 changes: 1 addition & 2 deletions bridges/snowbridge/runtime/runtime-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ impl<Balance, AccountId, FeeAssetLocation, EthereumNetwork, AssetTransactor, Fee
EthereumNetwork,
AssetTransactor,
FeeProvider,
>
where
> where
Balance: BaseArithmetic + Unsigned + Copy + From<u128> + Into<u128> + Debug,
AccountId: Clone + FullCodec,
FeeAssetLocation: Get<Location>,
Expand Down
3 changes: 1 addition & 2 deletions cumulus/pallets/parachain-system/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,7 @@ pub mod pallet {

let maximum_channels = host_config
.hrmp_max_message_num_per_candidate
.min(<AnnouncedHrmpMessagesPerCandidate<T>>::take())
as usize;
.min(<AnnouncedHrmpMessagesPerCandidate<T>>::take()) as usize;

// Note: this internally calls the `GetChannelInfo` implementation for this
// pallet, which draws on the `RelevantMessagingState`. That in turn has
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,7 @@ fn limited_teleport_native_assets_from_relay_to_system_para_works() {
let delivery_fees = Rococo::execute_with(|| {
xcm_helpers::teleport_assets_delivery_fees::<
<RococoXcmConfig as xcm_executor::Config>::XcmSender,
>(
test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest
)
>(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest)
});

let sender_balance_after = test.sender.balance;
Expand Down Expand Up @@ -351,9 +349,7 @@ fn limited_teleport_native_assets_back_from_system_para_to_relay_works() {
let delivery_fees = AssetHubRococo::execute_with(|| {
xcm_helpers::teleport_assets_delivery_fees::<
<AssetHubRococoXcmConfig as xcm_executor::Config>::XcmSender,
>(
test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest
)
>(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest)
});

// Sender's balance is reduced
Expand Down Expand Up @@ -394,9 +390,7 @@ fn limited_teleport_native_assets_from_system_para_to_relay_fails() {
let delivery_fees = AssetHubRococo::execute_with(|| {
xcm_helpers::teleport_assets_delivery_fees::<
<AssetHubRococoXcmConfig as xcm_executor::Config>::XcmSender,
>(
test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest
)
>(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest)
});

// Sender's balance is reduced
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,7 @@ fn limited_teleport_native_assets_from_relay_to_system_para_works() {
let delivery_fees = Westend::execute_with(|| {
xcm_helpers::teleport_assets_delivery_fees::<
<WestendXcmConfig as xcm_executor::Config>::XcmSender,
>(
test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest
)
>(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest)
});

let sender_balance_after = test.sender.balance;
Expand Down Expand Up @@ -351,9 +349,7 @@ fn limited_teleport_native_assets_back_from_system_para_to_relay_works() {
let delivery_fees = AssetHubWestend::execute_with(|| {
xcm_helpers::teleport_assets_delivery_fees::<
<AssetHubWestendXcmConfig as xcm_executor::Config>::XcmSender,
>(
test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest
)
>(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest)
});

// Sender's balance is reduced
Expand Down Expand Up @@ -394,9 +390,7 @@ fn limited_teleport_native_assets_from_system_para_to_relay_fails() {
let delivery_fees = AssetHubWestend::execute_with(|| {
xcm_helpers::teleport_assets_delivery_fees::<
<AssetHubWestendXcmConfig as xcm_executor::Config>::XcmSender,
>(
test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest
)
>(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest)
});

// Sender's balance is reduced
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,7 @@ fn limited_teleport_native_assets_from_relay_to_system_para_works() {
let delivery_fees = Rococo::execute_with(|| {
xcm_helpers::teleport_assets_delivery_fees::<
<RococoXcmConfig as xcm_executor::Config>::XcmSender,
>(
test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest
)
>(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest)
});

let sender_balance_after = test.sender.balance;
Expand Down Expand Up @@ -206,9 +204,7 @@ fn limited_teleport_native_assets_back_from_system_para_to_relay_works() {
let delivery_fees = PeopleRococo::execute_with(|| {
xcm_helpers::teleport_assets_delivery_fees::<
<PeopleRococoXcmConfig as xcm_executor::Config>::XcmSender,
>(
test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest
)
>(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest)
});

// Sender's balance is reduced
Expand Down Expand Up @@ -252,9 +248,7 @@ fn limited_teleport_native_assets_from_system_para_to_relay_fails() {
let delivery_fees = PeopleRococo::execute_with(|| {
xcm_helpers::teleport_assets_delivery_fees::<
<PeopleRococoXcmConfig as xcm_executor::Config>::XcmSender,
>(
test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest
)
>(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest)
});

// Sender's balance is reduced
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,7 @@ fn limited_teleport_native_assets_from_relay_to_system_para_works() {
let delivery_fees = Westend::execute_with(|| {
xcm_helpers::teleport_assets_delivery_fees::<
<WestendXcmConfig as xcm_executor::Config>::XcmSender,
>(
test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest
)
>(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest)
});

let sender_balance_after = test.sender.balance;
Expand Down Expand Up @@ -206,9 +204,7 @@ fn limited_teleport_native_assets_back_from_system_para_to_relay_works() {
let delivery_fees = PeopleWestend::execute_with(|| {
xcm_helpers::teleport_assets_delivery_fees::<
<PeopleWestendXcmConfig as xcm_executor::Config>::XcmSender,
>(
test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest
)
>(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest)
});

// Sender's balance is reduced
Expand Down Expand Up @@ -252,9 +248,7 @@ fn limited_teleport_native_assets_from_system_para_to_relay_fails() {
let delivery_fees = PeopleWestend::execute_with(|| {
xcm_helpers::teleport_assets_delivery_fees::<
<PeopleWestendXcmConfig as xcm_executor::Config>::XcmSender,
>(
test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest
)
>(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest)
});

// Sender's balance is reduced
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1146,8 +1146,7 @@ pub fn create_and_manage_foreign_assets_for_local_consensus_parachain_assets_wor
.with_balances(vec![(
foreign_creator_as_account_id.clone(),
existential_deposit +
asset_deposit +
metadata_deposit_base +
asset_deposit + metadata_deposit_base +
metadata_deposit_per_byte_eta +
buy_execution_fee_amount.into() +
buy_execution_fee_amount.into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -495,12 +495,11 @@ pub fn message_dispatch_routing_works<

// 2. this message is sent from other global consensus with destination of this Runtime
// sibling parachain (HRMP)
let bridging_message =
test_data::simulate_message_exporter_on_bridged_chain::<
BridgedNetwork,
NetworkWithParentCount<RuntimeNetwork, NetworkDistanceAsParentCount>,
AlwaysLatest,
>((RuntimeNetwork::get(), [Parachain(sibling_parachain_id)].into()));
let bridging_message = test_data::simulate_message_exporter_on_bridged_chain::<
BridgedNetwork,
NetworkWithParentCount<RuntimeNetwork, NetworkDistanceAsParentCount>,
AlwaysLatest,
>((RuntimeNetwork::get(), [Parachain(sibling_parachain_id)].into()));

// 2.1. WITHOUT opened hrmp channel -> RoutingError
let result =
Expand Down
6 changes: 2 additions & 4 deletions cumulus/primitives/utility/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,7 @@ impl<
FungiblesAssetMatcher,
OnUnbalanced,
AccountId,
>
where
> where
Fungibles::Balance: Into<u128>,
{
fn new() -> Self {
Expand Down Expand Up @@ -529,8 +528,7 @@ impl<
FungiblesAssetMatcher,
OnUnbalanced,
AccountId,
>
where
> where
Fungibles::Balance: Into<u128>,
{
fn drop(&mut self) {
Expand Down
7 changes: 1 addition & 6 deletions polkadot/node/core/approval-voting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2384,12 +2384,7 @@ fn schedule_wakeup_action(
last_assignment_tick.map(|l| l + APPROVAL_DELAY).filter(|t| t > &tick_now),
next_no_show,
)
.map(|tick| Action::ScheduleWakeup {
block_hash,
block_number,
candidate_hash,
tick,
})
.map(|tick| Action::ScheduleWakeup { block_hash, block_number, candidate_hash, tick })
},
RequiredTranches::Pending { considered, next_no_show, clock_drift, .. } => {
// select the minimum of `next_no_show`, or the tick of the next non-empty tranche
Expand Down
3 changes: 1 addition & 2 deletions polkadot/node/core/approval-voting/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,7 @@ where
_relay_vrf_story: polkadot_node_primitives::approval::v1::RelayVRFStory,
_assignment: &polkadot_node_primitives::approval::v2::AssignmentCertV2,
_backing_groups: Vec<polkadot_primitives::GroupIndex>,
) -> Result<polkadot_node_primitives::approval::v1::DelayTranche, criteria::InvalidAssignment>
{
) -> Result<polkadot_node_primitives::approval::v1::DelayTranche, criteria::InvalidAssignment> {
self.1(validator_index)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ fn try_restrict(worker_info: &WorkerInfo) -> Result<()> {
libc::MS_BIND |
libc::MS_REC | libc::MS_NOEXEC |
libc::MS_NODEV | libc::MS_NOSUID |
libc::MS_NOATIME |
additional_flags,
libc::MS_NOATIME | additional_flags,
ptr::null(), // ignored when MS_BIND is used
) < 0
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,9 @@ impl FetchChunks {
state: &mut State,
common_params: &RecoveryParams,
) -> Result<AvailableData, RecoveryError> {
let recovery_duration =
common_params
.metrics
.time_erasure_recovery(RecoveryStrategy::<Sender>::strategy_type(self));
let recovery_duration = common_params
.metrics
.time_erasure_recovery(RecoveryStrategy::<Sender>::strategy_type(self));

// Send request to reconstruct available data from chunks.
let (avilable_data_tx, available_data_rx) = oneshot::channel();
Expand Down
2 changes: 1 addition & 1 deletion polkadot/node/overseer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ tikv-jemalloc-ctl = "0.5.0"
[features]
default = ["futures_channel"]
expand = ["orchestra/expand"]
futures_channel = ["orchestra/futures_channel"]
futures_channel = [ "orchestra/futures_channel"]
jemalloc-allocator = ["dep:tikv-jemalloc-ctl"]
16 changes: 8 additions & 8 deletions polkadot/node/subsystem-bench/src/lib/statement/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,14 @@ fn build_overseer(
state.pvd.clone(),
state.own_backing_group.clone(),
);
let (statement_req_receiver, statement_req_cfg) =
IncomingRequest::get_config_receiver::<Block, sc_network::NetworkWorker<Block, Hash>>(
&ReqProtocolNames::new(GENESIS_HASH, None),
);
let (candidate_req_receiver, candidate_req_cfg) =
IncomingRequest::get_config_receiver::<Block, sc_network::NetworkWorker<Block, Hash>>(
&ReqProtocolNames::new(GENESIS_HASH, None),
);
let (statement_req_receiver, statement_req_cfg) = IncomingRequest::get_config_receiver::<
Block,
sc_network::NetworkWorker<Block, Hash>,
>(&ReqProtocolNames::new(GENESIS_HASH, None));
let (candidate_req_receiver, candidate_req_cfg) = IncomingRequest::get_config_receiver::<
Block,
sc_network::NetworkWorker<Block, Hash>,
>(&ReqProtocolNames::new(GENESIS_HASH, None));
let keystore = make_keystore();
let subsystem = StatementDistributionSubsystem::new(
keystore.clone(),
Expand Down
3 changes: 1 addition & 2 deletions polkadot/node/subsystem-types/src/runtime_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -643,8 +643,7 @@ where
fn number(
&self,
hash: Block::Hash,
) -> sc_client_api::blockchain::Result<Option<<<Block as BlockT>::Header as HeaderT>::Number>>
{
) -> sc_client_api::blockchain::Result<Option<<<Block as BlockT>::Header as HeaderT>::Number>> {
self.client.number(hash)
}

Expand Down
2 changes: 1 addition & 1 deletion polkadot/runtime/parachains/src/hrmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ impl<T: Config> Pallet<T> {
outgoing_paras.len() as u32
))
.saturating_add(<T as Config>::WeightInfo::force_process_hrmp_close(
outgoing_paras.len() as u32,
outgoing_paras.len() as u32
))
}

Expand Down
25 changes: 12 additions & 13 deletions polkadot/runtime/parachains/src/paras_inherent/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1164,19 +1164,18 @@ fn filter_backed_statements_from_disabled_validators<

// Get relay parent block number of the candidate. We need this to get the group index
// assigned to this core at this block number
let relay_parent_block_number = match allowed_relay_parents
.acquire_info(bc.descriptor().relay_parent, None)
{
Some((_, block_num)) => block_num,
None => {
log::debug!(
target: LOG_TARGET,
"Relay parent {:?} for candidate is not in the allowed relay parents. Dropping the candidate.",
bc.descriptor().relay_parent
);
return false
},
};
let relay_parent_block_number =
match allowed_relay_parents.acquire_info(bc.descriptor().relay_parent, None) {
Some((_, block_num)) => block_num,
None => {
log::debug!(
target: LOG_TARGET,
"Relay parent {:?} for candidate is not in the allowed relay parents. Dropping the candidate.",
bc.descriptor().relay_parent
);
return false
},
};

// Get the group index for the core
let group_idx = match scheduler::Pallet::<T>::group_assigned_to_core(
Expand Down
7 changes: 3 additions & 4 deletions polkadot/runtime/parachains/src/ump_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,11 +462,10 @@ fn verify_relay_dispatch_queue_size_is_externally_accessible() {

fn assert_queue_size(para: ParaId, count: u32, size: u32) {
#[allow(deprecated)]
let raw_queue_size = sp_io::storage::get(&well_known_keys::relay_dispatch_queue_size(para))
.expect(
"enqueuing a message should create the dispatch queue\
let raw_queue_size = sp_io::storage::get(&well_known_keys::relay_dispatch_queue_size(para)).expect(
"enqueuing a message should create the dispatch queue\
and it should be accessible via the well known keys",
);
);
let (c, s) = <(u32, u32)>::decode(&mut &raw_queue_size[..])
.expect("the dispatch queue size should be decodable into (u32, u32)");
assert_eq!((c, s), (count, size));
Expand Down
3 changes: 1 addition & 2 deletions polkadot/runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1011,8 +1011,7 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
matches!(
c,
RuntimeCall::Staking(..) |
RuntimeCall::Session(..) |
RuntimeCall::Utility(..) |
RuntimeCall::Session(..) | RuntimeCall::Utility(..) |
RuntimeCall::FastUnstake(..) |
RuntimeCall::VoterList(..) |
RuntimeCall::NominationPools(..)
Expand Down
Loading

0 comments on commit e42b72c

Please sign in to comment.