mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 10:31:04 +00:00
ci: Better job parallelism, cancel pipeline on failure and extra clippy checks (#1409)
* ci: Change CI order for better parallelism Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * ci: Cancel ongoing jobs Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * TO REVERT: Check early termination due to clipp/check Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * ci/clippy: Extend clippy checks for lightclient and web feature flags Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * ci: Use cancel-action@3 Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Derive Default Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt/rpc: Resolve redundant closure Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * tests: Fix clippy Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Fix clippy warnings Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * ci: Extend clippy rules Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Remove redundant clone Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * ci: Use subxt instead of subxt-lightclient Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * ci: Add wasm clippy step Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * ci: Simplify the clippy step into a single run command Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * ci: Pin version for cancel-action Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * ci: Fix pinned version Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
@@ -6,11 +6,13 @@ use super::{rpc::LightClientRpc, LightClient, LightClientError};
|
||||
use crate::backend::rpc::RpcClient;
|
||||
use crate::client::RawLightClient;
|
||||
use crate::macros::{cfg_jsonrpsee_native, cfg_jsonrpsee_web};
|
||||
use crate::utils::validate_url_is_secure;
|
||||
use crate::{config::Config, error::Error, OnlineClient};
|
||||
use std::num::NonZeroU32;
|
||||
use subxt_lightclient::{smoldot, AddedChain};
|
||||
|
||||
#[cfg(feature = "jsonrpsee")]
|
||||
use crate::utils::validate_url_is_secure;
|
||||
|
||||
/// Builder for [`LightClient`].
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct LightClientBuilder<T: Config> {
|
||||
@@ -186,16 +188,11 @@ impl<T: Config> LightClientBuilder<T> {
|
||||
}
|
||||
|
||||
/// Raw builder for [`RawLightClient`].
|
||||
#[derive(Default)]
|
||||
pub struct RawLightClientBuilder {
|
||||
chains: Vec<AddedChain>,
|
||||
}
|
||||
|
||||
impl Default for RawLightClientBuilder {
|
||||
fn default() -> Self {
|
||||
Self { chains: Vec::new() }
|
||||
}
|
||||
}
|
||||
|
||||
impl RawLightClientBuilder {
|
||||
/// Create a new [`RawLightClientBuilder`].
|
||||
pub fn new() -> RawLightClientBuilder {
|
||||
|
||||
@@ -56,8 +56,7 @@ impl LightClientRpc {
|
||||
pub fn new(
|
||||
config: smoldot::AddChainConfig<'_, (), impl Iterator<Item = smoldot::ChainId>>,
|
||||
) -> Result<LightClientRpc, Error> {
|
||||
let rpc = subxt_lightclient::LightClientRpc::new(config)
|
||||
.map_err(|err| LightClientError::Rpc(err))?;
|
||||
let rpc = subxt_lightclient::LightClientRpc::new(config).map_err(LightClientError::Rpc)?;
|
||||
|
||||
Ok(LightClientRpc(rpc))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user