mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 18:01:03 +00:00
Use a BoundedVec in ValidationResult (#6603)
* Use a `BoundedVec` in `ValidationResult` > Use a `BoundedVec` for `upward_messages` and `horizontal_messages` in order to > limit the number of individual messages/memory allocations right at decoding > time. The reason for this is that the `ValidationResult` may contain a code > upgrade (including a full PVF binary), so the total size limit can't be set > too low and this limit will still allow several millions of upward messages, > which will (due to the memory allocator overhead) already have a > non-negligible memory footprint in decoded form. * List all fields when hashing so we don't miss one * Define types for `BoundedVec`s of messages * Fix test compile errors * Depend on `bounded-collections` 0.1.4 (fixes allocation issue) * Fix compilation issue * Derive `Hash` instead of manual `impl` * Avoid use of unwrap
This commit is contained in:
@@ -41,7 +41,7 @@ fn pallet_query_should_work() {
|
||||
let expected_msg = Xcm::<()>(vec![QueryResponse {
|
||||
query_id: 1,
|
||||
max_weight: Weight::from_parts(50, 50),
|
||||
response: Response::PalletsInfo(vec![].try_into().unwrap()),
|
||||
response: Response::PalletsInfo(Default::default()),
|
||||
querier: Some(Here.into()),
|
||||
}]);
|
||||
let expected_hash = fake_message_hash(&expected_msg);
|
||||
|
||||
Reference in New Issue
Block a user