mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 16:21:02 +00:00
Companion for Substrate#10655 (#4765)
* Companion for Substrate#10655 https://github.com/paritytech/substrate/pull/10655 This removes the last usages of `Default` in conjunction with `AccountId` * More fixes * More of them! * FMT * Update Substrate
This commit is contained in:
@@ -409,11 +409,13 @@ pub fn account_info_storage_key(id: &AccountId) -> Vec<u8> {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use sp_runtime::codec::Encode;
|
||||
use parity_scale_codec::Decode;
|
||||
use sp_runtime::{codec::Encode, traits::TrailingZeroInput};
|
||||
|
||||
#[test]
|
||||
fn maximal_encoded_account_id_size_is_correct() {
|
||||
let actual_size = AccountId::default().encode().len();
|
||||
let actual_size =
|
||||
AccountId::decode(&mut TrailingZeroInput::new(&[])).unwrap().encode().len();
|
||||
assert!(
|
||||
actual_size <= MAXIMAL_ENCODED_ACCOUNT_ID_SIZE as usize,
|
||||
"Actual size of encoded account id for Polkadot-like chains ({}) is larger than expected {}",
|
||||
|
||||
Reference in New Issue
Block a user