mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 11:41:02 +00:00
Update to latest Substrate & Polkadot (#107)
* Update to latest Substrate & Polkadot * Replace --unsafe-rpc-export with --unsafe-rpc-external * Add --rpc-methods=Unsafe Documented in substrate 24486f52929e9e518eeccbc6ad6da70e9e5bdf8a * typos * more typo * fixed rpc expose * Disable the integration test Co-authored-by: Cecile Tonglet <cecile.tonglet@cecton.com>
This commit is contained in:
@@ -24,8 +24,8 @@ use futures::{future::FutureExt, join, pin_mut, select};
|
||||
use jsonrpsee::{raw::RawClient, transport::http::HttpTransportClient};
|
||||
use polkadot_primitives::parachain::{Info, Scheduling};
|
||||
use polkadot_primitives::Hash as PHash;
|
||||
use polkadot_runtime::{Header, OnlyStakingAndClaims, Runtime, SignedExtra, SignedPayload};
|
||||
use polkadot_runtime_common::{parachains, registrar, BlockHashCount};
|
||||
use polkadot_runtime::{Header, Runtime, SignedExtra, SignedPayload, IsCallable};
|
||||
use polkadot_runtime_common::{parachains, registrar, BlockHashCount, claims, TransactionCallFilter};
|
||||
use serde_json::Value;
|
||||
use sp_arithmetic::traits::SaturatedConversion;
|
||||
use sp_runtime::generic;
|
||||
@@ -166,6 +166,7 @@ async fn wait_for_blocks(number_of_blocks: usize, mut client: &mut RawClient<Htt
|
||||
|
||||
#[async_std::test]
|
||||
#[ignore]
|
||||
#[cfg(feature = "disabled")]
|
||||
async fn integration_test() {
|
||||
assert!(
|
||||
!net::TcpStream::connect("127.0.0.1:27015").await.is_ok(),
|
||||
@@ -192,7 +193,7 @@ async fn integration_test() {
|
||||
.arg("--base-path")
|
||||
.arg(polkadot_alice_dir.path())
|
||||
.arg("--alice")
|
||||
.arg("--unsafe-rpc-expose")
|
||||
.arg("--rpc-methods=unsafe")
|
||||
.arg("--rpc-port=27015")
|
||||
.arg("--port=27115")
|
||||
.spawn()
|
||||
@@ -208,7 +209,7 @@ async fn integration_test() {
|
||||
.arg("--base-path")
|
||||
.arg(polkadot_bob_dir.path())
|
||||
.arg("--bob")
|
||||
.arg("--unsafe-rpc-expose")
|
||||
.arg("--rpc-methods=unsafe")
|
||||
.arg("--rpc-port=27016")
|
||||
.arg("--port=27116")
|
||||
.spawn()
|
||||
@@ -291,8 +292,9 @@ async fn integration_test() {
|
||||
.unwrap_or(2) as u64;
|
||||
let tip = 0;
|
||||
let extra: SignedExtra = (
|
||||
OnlyStakingAndClaims,
|
||||
frame_system::CheckVersion::<Runtime>::new(),
|
||||
TransactionCallFilter::<IsCallable, polkadot_runtime::Call>::new(),
|
||||
frame_system::CheckSpecVersion::<Runtime>::new(),
|
||||
frame_system::CheckTxVersion::<Runtime>::new(),
|
||||
frame_system::CheckGenesis::<Runtime>::new(),
|
||||
frame_system::CheckEra::<Runtime>::from(generic::Era::mortal(period, current_block)),
|
||||
frame_system::CheckNonce::<Runtime>::from(nonce),
|
||||
@@ -300,6 +302,8 @@ async fn integration_test() {
|
||||
pallet_transaction_payment::ChargeTransactionPayment::<Runtime>::from(tip),
|
||||
registrar::LimitParathreadCommits::<Runtime>::new(),
|
||||
parachains::ValidateDoubleVoteReports::<Runtime>::new(),
|
||||
pallet_grandpa::ValidateEquivocationReport::<Runtime>::new(),
|
||||
claims::PrevalidateAttests::<Runtime>::new(),
|
||||
);
|
||||
let raw_payload = SignedPayload::from_raw(
|
||||
call.clone().into(),
|
||||
@@ -307,6 +311,7 @@ async fn integration_test() {
|
||||
(
|
||||
(),
|
||||
runtime_version.spec_version,
|
||||
runtime_version.transaction_version,
|
||||
genesis_block,
|
||||
current_block_hash,
|
||||
(),
|
||||
@@ -314,6 +319,8 @@ async fn integration_test() {
|
||||
(),
|
||||
(),
|
||||
(),
|
||||
(),
|
||||
(),
|
||||
),
|
||||
);
|
||||
let signature = raw_payload.using_encoded(|e| Alice.sign(e));
|
||||
@@ -337,7 +344,7 @@ async fn integration_test() {
|
||||
.stderr(Stdio::piped())
|
||||
.arg("--base-path")
|
||||
.arg(cumulus_charlie_dir.path())
|
||||
.arg("--unsafe-rpc-expose")
|
||||
.arg("--rpc-methods=unsafe")
|
||||
.arg("--rpc-port=27017")
|
||||
.arg("--port=27117")
|
||||
.arg("--")
|
||||
|
||||
Reference in New Issue
Block a user