Skip to content

Commit 7901c7f

Browse files
committed
Update parachain struct with newly introduced field
1 parent 9ace627 commit 7901c7f

3 files changed

Lines changed: 21 additions & 2 deletions

File tree

core/src/common/empty_block/inherents/custom_idps/para_parachain.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
2121
use std::{ops::DerefMut, sync::Arc};
2222

23+
use cumulus_primitives_core::relay_chain::UpgradeGoAhead;
2324
use parity_scale_codec::{Decode, Encode};
2425
use polkadot_primitives::{BlockNumber, HeadData};
2526
use sp_consensus_babe::SlotDuration;
@@ -119,6 +120,7 @@ impl<B: BlockT> sp_inherents::InherentDataProvider for InherentDataProvider<B> {
119120
raw_horizontal_messages: Default::default(),
120121
additional_key_values: Some(additional_key_values),
121122
para_id: para_id.into(),
123+
upgrade_go_ahead: Some(UpgradeGoAhead::GoAhead),
122124
}
123125
.provide_inherent_data(inherent_data)
124126
.await

core/tests/create_snapshot.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ async fn create_snapshot_works() {
4242
match common::start_node_inline(vec![
4343
"--no-hardware-benchmarks",
4444
"--dev",
45+
"--tmp",
4546
format!("--rpc-port={}", port).as_str(),
47+
"--no-telemetry",
48+
"--no-prometheus",
49+
"--rpc-max-response-size=1000", // Allow large RPC responses for snapshot creation
4650
]) {
4751
Ok(_) => {}
4852
Err(e) => {
@@ -51,7 +55,7 @@ async fn create_snapshot_works() {
5155
}
5256
});
5357
// Wait some time to ensure the node is warmed up.
54-
std::thread::sleep(Duration::from_secs(90));
58+
std::thread::sleep(Duration::from_secs(180));
5559

5660
// Run the command with tokio
5761
let temp_dir = tempfile::Builder::new()
@@ -84,6 +88,12 @@ async fn create_snapshot_works() {
8488
let child = create_snapshot(&ws_url, &snap_file_path, block_hash);
8589
let out = child.wait_with_output().await.unwrap();
8690

91+
if !out.status.success() {
92+
eprintln!("\n❌ create-snapshot failed!");
93+
eprintln!("Status: {:?}", out.status);
94+
eprintln!("\nStdout:\n{}", String::from_utf8_lossy(&out.stdout));
95+
eprintln!("\nStderr:\n{}", String::from_utf8_lossy(&out.stderr));
96+
}
8797
assert!(out.status.success());
8898

8999
let snapshot_is_on_disk = Path::new(&snap_file_path).exists();

core/tests/execute_block.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ async fn execute_block_works() {
3333
match common::start_node_inline(vec![
3434
"--no-hardware-benchmarks",
3535
"--dev",
36+
"--tmp",
3637
format!("--rpc-port={}", port).as_str(),
38+
"--no-telemetry",
39+
"--no-prometheus",
40+
"--rpc-max-response-size=1000", // Allow large RPC responses
3741
]) {
3842
Ok(_) => {}
3943
Err(e) => {
@@ -42,7 +46,7 @@ async fn execute_block_works() {
4246
}
4347
});
4448
// Wait some time to ensure the node is warmed up.
45-
std::thread::sleep(Duration::from_secs(90));
49+
std::thread::sleep(Duration::from_secs(180));
4650

4751
// Test passing --at
4852
common::run_with_timeout(Duration::from_secs(60), async move {
@@ -74,6 +78,9 @@ async fn execute_block_works() {
7478
common::wait_for_stream_pattern_match(block_execution.stderr.take().unwrap(), re).await;
7579

7680
// Assert that the block-execution process has executed the expected block.
81+
if let Err(ref e) = matched {
82+
println!("Error: {}", e);
83+
}
7784
assert!(matched.is_ok());
7885

7986
// Assert that the block-execution exited succesfully

0 commit comments

Comments
 (0)