mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 11:41:02 +00:00
* Convert message `Vec`s into `BoundedVec`s
* cargo fmt
* Fix missing conversions in collator
* Fix the fix
* Fix the fix to the fix
* Fix tests
* Fix^4
* Avoid use of unwrap
* update lockfile for {"substrate", "polkadot"}
---------
Co-authored-by: parity-processbot <>
This commit is contained in:
Generated
+259
-256
File diff suppressed because it is too large
Load Diff
@@ -198,11 +198,34 @@ where
|
||||
.ok()
|
||||
.flatten()?;
|
||||
|
||||
let upward_messages = collation_info
|
||||
.upward_messages
|
||||
.try_into()
|
||||
.map_err(|e| {
|
||||
tracing::error!(
|
||||
target: LOG_TARGET,
|
||||
error = ?e,
|
||||
"Number of upward messages should not be greater than `MAX_UPWARD_MESSAGE_NUM`",
|
||||
)
|
||||
})
|
||||
.ok()?;
|
||||
let horizontal_messages = collation_info
|
||||
.horizontal_messages
|
||||
.try_into()
|
||||
.map_err(|e| {
|
||||
tracing::error!(
|
||||
target: LOG_TARGET,
|
||||
error = ?e,
|
||||
"Number of horizontal messages should not be greater than `MAX_HORIZONTAL_MESSAGE_NUM`",
|
||||
)
|
||||
})
|
||||
.ok()?;
|
||||
|
||||
Some(Collation {
|
||||
upward_messages: collation_info.upward_messages,
|
||||
upward_messages,
|
||||
new_validation_code: collation_info.new_validation_code,
|
||||
processed_downward_messages: collation_info.processed_downward_messages,
|
||||
horizontal_messages: collation_info.horizontal_messages,
|
||||
horizontal_messages,
|
||||
hrmp_watermark: collation_info.hrmp_watermark,
|
||||
head_data: collation_info.head_data,
|
||||
proof_of_validity: MaybeCompressedPoV::Compressed(pov),
|
||||
|
||||
@@ -136,8 +136,8 @@ impl RelayChainInterface for DummyRelayChainInterface {
|
||||
validation_code_hash: ValidationCodeHash::from(PHash::random()),
|
||||
},
|
||||
commitments: CandidateCommitments {
|
||||
upward_messages: Vec::new(),
|
||||
horizontal_messages: Vec::new(),
|
||||
upward_messages: Default::default(),
|
||||
horizontal_messages: Default::default(),
|
||||
new_validation_code: None,
|
||||
head_data: HeadData(Vec::new()),
|
||||
processed_downward_messages: 0,
|
||||
|
||||
@@ -26,14 +26,14 @@ use polkadot_parachain::primitives::{
|
||||
HeadData, RelayChainBlockNumber, ValidationParams, ValidationResult,
|
||||
};
|
||||
|
||||
use codec::{Decode, Encode};
|
||||
use codec::Encode;
|
||||
|
||||
use frame_support::traits::{ExecuteBlock, ExtrinsicCall, Get, IsSubType};
|
||||
use sp_core::storage::{ChildInfo, StateVersion};
|
||||
use sp_externalities::{set_and_run_with_externalities, Externalities};
|
||||
use sp_io::KillStorageResult;
|
||||
use sp_runtime::traits::{Block as BlockT, Extrinsic, HashFor, Header as HeaderT};
|
||||
use sp_std::{mem, prelude::*};
|
||||
use sp_std::prelude::*;
|
||||
use sp_trie::MemoryDB;
|
||||
|
||||
type TrieBackend<B> = sp_state_machine::TrieBackend<MemoryDB<HashFor<B>>, HashFor<B>>;
|
||||
@@ -187,9 +187,13 @@ where
|
||||
E::execute_block(block);
|
||||
|
||||
let new_validation_code = crate::NewValidationCode::<PSC>::get();
|
||||
let upward_messages = crate::UpwardMessages::<PSC>::get();
|
||||
let upward_messages = crate::UpwardMessages::<PSC>::get().try_into().expect(
|
||||
"Number of upward messages should not be greater than `MAX_UPWARD_MESSAGE_NUM`",
|
||||
);
|
||||
let processed_downward_messages = crate::ProcessedDownwardMessages::<PSC>::get();
|
||||
let horizontal_messages = crate::HrmpOutboundMessages::<PSC>::get();
|
||||
let horizontal_messages = crate::HrmpOutboundMessages::<PSC>::get().try_into().expect(
|
||||
"Number of horizontal messages should not be greater than `MAX_HORIZONTAL_MESSAGE_NUM`",
|
||||
);
|
||||
let hrmp_watermark = crate::HrmpWatermark::<PSC>::get();
|
||||
|
||||
let head_data =
|
||||
|
||||
Reference in New Issue
Block a user