mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 18:41:03 +00:00
Bump Substrate/Polkadot/Cumulus refs (#1295)
Substrate: 31d90c202d6df9ce3837ee55587b604619a912ba
Polkadot: 60df3c55c711c2872872d6220f98b2611340e051
Cumulus: a9630551c2
This commit is contained in:
committed by
Bastian Köcher
parent
fe34a526bb
commit
ea2d6f898d
@@ -30,13 +30,13 @@ use frame_support::{
|
||||
};
|
||||
use frame_system::limits;
|
||||
use scale_info::TypeInfo;
|
||||
use sp_core::Hasher as HasherT;
|
||||
use sp_core::{storage::StateVersion, Hasher as HasherT};
|
||||
use sp_runtime::{
|
||||
traits::{Convert, IdentifyAccount, Verify},
|
||||
MultiSignature, MultiSigner, Perbill,
|
||||
};
|
||||
use sp_std::prelude::*;
|
||||
use sp_trie::{trie_types::Layout, TrieConfiguration};
|
||||
use sp_trie::{LayoutV0, LayoutV1, TrieConfiguration};
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
@@ -206,12 +206,18 @@ impl sp_core::Hasher for BlakeTwoAndKeccak256 {
|
||||
impl sp_runtime::traits::Hash for BlakeTwoAndKeccak256 {
|
||||
type Output = MillauHash;
|
||||
|
||||
fn trie_root(input: Vec<(Vec<u8>, Vec<u8>)>) -> Self::Output {
|
||||
Layout::<BlakeTwoAndKeccak256>::trie_root(input)
|
||||
fn trie_root(input: Vec<(Vec<u8>, Vec<u8>)>, state_version: StateVersion) -> Self::Output {
|
||||
match state_version {
|
||||
StateVersion::V0 => LayoutV0::<BlakeTwoAndKeccak256>::trie_root(input),
|
||||
StateVersion::V1 => LayoutV1::<BlakeTwoAndKeccak256>::trie_root(input),
|
||||
}
|
||||
}
|
||||
|
||||
fn ordered_trie_root(input: Vec<Vec<u8>>) -> Self::Output {
|
||||
Layout::<BlakeTwoAndKeccak256>::ordered_trie_root(input)
|
||||
fn ordered_trie_root(input: Vec<Vec<u8>>, state_version: StateVersion) -> Self::Output {
|
||||
match state_version {
|
||||
StateVersion::V0 => LayoutV0::<BlakeTwoAndKeccak256>::ordered_trie_root(input),
|
||||
StateVersion::V1 => LayoutV1::<BlakeTwoAndKeccak256>::ordered_trie_root(input),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,9 +346,9 @@ mod tests {
|
||||
#[test]
|
||||
fn maximal_account_size_does_not_overflow_constant() {
|
||||
assert!(
|
||||
MAXIMAL_ENCODED_ACCOUNT_ID_SIZE as usize >= AccountId::default().encode().len(),
|
||||
MAXIMAL_ENCODED_ACCOUNT_ID_SIZE as usize >= AccountId::from([0u8; 32]).encode().len(),
|
||||
"Actual maximal size of encoded AccountId ({}) overflows expected ({})",
|
||||
AccountId::default().encode().len(),
|
||||
AccountId::from([0u8; 32]).encode().len(),
|
||||
MAXIMAL_ENCODED_ACCOUNT_ID_SIZE,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user