Skip to content

Commit

Permalink
Merge branch 'master' into bh/644-fix-compile-errors
Browse files Browse the repository at this point in the history
  • Loading branch information
haerdib authored Nov 28, 2023
2 parents 49fe2b6 + 511be68 commit 4133b0e
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 113 deletions.
7 changes: 0 additions & 7 deletions node-api/src/metadata/metadata_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ pub struct Metadata {
}

impl Metadata {
/// Access a pallet given its name.
#[deprecated(note = "please use `pallet_by_name` or `pallet_by_name_err` instead")]
pub fn pallet(&self, pallet_name: &str) -> Result<PalletMetadata<'_>, MetadataError> {
self.pallet_by_name(pallet_name)
.ok_or_else(|| MetadataError::PalletNameNotFound(pallet_name.to_string()))
}

/// An iterator over all of the available pallets.
pub fn pallets(&self) -> impl Iterator<Item = PalletMetadata<'_>> {
self.pallets.values().map(|inner| PalletMetadata { inner, types: self.types() })
Expand Down
6 changes: 0 additions & 6 deletions primitives/src/config/asset_runtime_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,3 @@ impl Config for AssetRuntimeConfig {
/// A struct representing the signed extra and additional parameters required
/// to construct a transaction and pay in asset fees.
pub type AssetTipExtrinsicParams<T> = GenericExtrinsicParams<T, AssetTip<<T as Config>::Balance>>;

#[deprecated(
since = "0.14.0",
note = "Please use `AssetRuntimeConfig` instead, this will be removed in the next release."
)]
pub type SubstrateKitchensinkConfig = AssetRuntimeConfig;
6 changes: 0 additions & 6 deletions primitives/src/config/default_runtime_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,3 @@ pub type DefaultRuntimeConfig =
/// A struct representing the signed extra and additional parameters required
/// to construct a transaction and pay in token fees.
pub type PlainTipExtrinsicParams<T> = GenericExtrinsicParams<T, PlainTip<<T as Config>::Balance>>;

#[deprecated(
since = "0.14.0",
note = "Please use `DefaultRuntimeConfig` instead, this will be removed in the next release."
)]
pub type PolkadotConfig = DefaultRuntimeConfig;
94 changes: 0 additions & 94 deletions src/api/rpc_api/author.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,57 +212,6 @@ pub trait SubmitAndWatch {
) -> Result<ExtrinsicReport<Self::Hash>>;
}

#[maybe_async::maybe_async(?Send)]
pub trait SubmitAndWatchUntilSuccess {
type Client: Subscribe;
type Hash: Decode;

/// Submit an extrinsic and watch it until
/// - wait_for_finalized = false => InBlock
/// - wait_for_finalized = true => Finalized
/// Returns and error if the extrinsic was not successfully executed.
/// If it was successful, a report containing the following is returned:
/// - extrinsic hash
/// - hash of the block the extrinsic was included in
/// - last known extrinsic (transaction) status
/// - associated events of the extrinsic
/// This method is blocking.
#[deprecated(
since = "0.14.0",
note = "please use `SubmitAndWatch::submit_and_watch_extrinsic_until` instead, this will be removed in the next release."
)]
async fn submit_and_watch_extrinsic_until_success<Address, Call, Signature, SignedExtra>(
&self,
extrinsic: UncheckedExtrinsicV4<Address, Call, Signature, SignedExtra>,
wait_for_finalized: bool,
) -> Result<ExtrinsicReport<Self::Hash>>
where
Address: Encode,
Call: Encode,
Signature: Encode,
SignedExtra: Encode;

/// Submit an encoded, opaque extrinsic and watch it until
/// - wait_for_finalized = false => InBlock
/// - wait_for_finalized = true => Finalized
/// Returns and error if the extrinsic was not successfully executed.
/// If it was successful, a report containing the following is returned:
/// - extrinsic hash
/// - hash of the block the extrinsic was included in
/// - last known extrinsic (transaction) status
/// - associated events of the extrinsic
/// This method is blocking.
#[deprecated(
since = "0.14.0",
note = "please use `SubmitAndWatch::submit_and_watch_opaque_extrinsic_until` instead, this will be removed in the next release."
)]
async fn submit_and_watch_opaque_extrinsic_until_success(
&self,
encoded_extrinsic: &Bytes,
wait_for_finalized: bool,
) -> Result<ExtrinsicReport<Self::Hash>>;
}

#[maybe_async::maybe_async(?Send)]
impl<T, Client> SubmitAndWatch for Api<T, Client>
where
Expand Down Expand Up @@ -393,46 +342,3 @@ where
Err(Error::NoStream)
}
}

#[maybe_async::maybe_async(?Send)]
impl<T, Client> SubmitAndWatchUntilSuccess for Api<T, Client>
where
T: Config,
Client: Subscribe + Request,
{
type Client = Client;
type Hash = T::Hash;

async fn submit_and_watch_extrinsic_until_success<Address, Call, Signature, SignedExtra>(
&self,
extrinsic: UncheckedExtrinsicV4<Address, Call, Signature, SignedExtra>,
wait_for_finalized: bool,
) -> Result<ExtrinsicReport<Self::Hash>>
where
Address: Encode,
Call: Encode,
Signature: Encode,
SignedExtra: Encode,
{
let xt_status = match wait_for_finalized {
true => XtStatus::Finalized,
false => XtStatus::InBlock,
};

self.submit_and_watch_opaque_extrinsic_until(&extrinsic.encode().into(), xt_status)
.await
}

async fn submit_and_watch_opaque_extrinsic_until_success(
&self,
encoded_extrinsic: &Bytes,
wait_for_finalized: bool,
) -> Result<ExtrinsicReport<Self::Hash>> {
let xt_status = match wait_for_finalized {
true => XtStatus::Finalized,
false => XtStatus::InBlock,
};

self.submit_and_watch_opaque_extrinsic_until(encoded_extrinsic, xt_status).await
}
}

0 comments on commit 4133b0e

Please sign in to comment.