mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 07:41:08 +00:00
Update fixed-hash & uint utilities (#1078)
* [core/primitives] Update crunchy 0.1 => 0.2
* [core/primitives] Update fixed-hash 0.2 => 0.3.0-beta
* [core/primitives] Update `uint` 0.4 => 0.5.0-beta
* [core/state-machine] Fix errors emerged by fixed-hash update
* [core/state-db] Fix errors that emerged from fixed-hash update
* [core/sr-io] Fix errors that emerged from the fixed-hash update
* [core/trie] Fix errors emerged from fixed-hash updates
* [core/trie] Make use of new Hash::as_fixed_bytes_mut method in tests
* [core/sr-primitives] Fix errors emerged from updating fixed-hash
* [core/executor] Fix errors that emerged from fixed-hash update
* [core/test-runtime] Fix errors that emerged from updating fixed-hash
* [core/test-runtime] Fix an error that emerged from fixed-hash update
* [core/transaction-pool] Fix errors that emerged from updating fixed-hash
* Add From<u64> impl for hash types defined in core/primitives
* [core/client/db] Fix errors that emerged from fixed-hash update
* [core/{client/network/rpc}]: Fix errors emerged by fixed-hash update
* [node/{cli/executor/runtime}]: Fix errors emerged by updating fixed-hash
* [core/network]: Fix bug in parsing constant str
* Update Cargo.lock
- Add crunchy 0.2.1
- fixed-hash 0.2.2 => 0.3.0-beta.3
- Add static-assertions 0.2.5
- uint 0.4.1 => 0.5.0-beta.1
* [core/primitives]: Add fixed-hash/rustc-hex feature for FromStr impl
* [core/primitives] No longer provide From<u64> impl for hash types if byteorder support is not enabled
* [core/primitives] Revert to using From impl again in primitives tests
* [core/..] Fix some bugs that emerged by recent fixed-hash updates
* Update a bunch of Cargo.lock files
* [core/state-db] Re-add whitespace between attr and extern crate/mod
* [core/primitives] Fix bug in From<u64> impl for hash types using the wrong feature guard
This commit is contained in:
committed by
Bastian Köcher
parent
9072fce658
commit
660c747c51
@@ -371,7 +371,7 @@ mod tests {
|
||||
let changes_trie_storage = InMemoryChangesTrieStorage::new();
|
||||
let mut ext = Ext::new(&mut overlay, &backend, Some(&changes_trie_storage));
|
||||
const ROOT: [u8; 32] = hex!("0b41e488cccbd67d1f1089592c2c235f5c5399b053f7fe9152dd4b5f279914cd");
|
||||
assert_eq!(ext.storage_root(), H256(ROOT));
|
||||
assert_eq!(ext.storage_root(), H256::from(ROOT));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -211,7 +211,8 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn proof_is_invalid_when_does_not_contains_root() {
|
||||
assert!(create_proof_check_backend::<Blake2Hasher>(1.into(), vec![]).is_err());
|
||||
use primitives::H256;
|
||||
assert!(create_proof_check_backend::<Blake2Hasher>(H256::from_low_u64_be(1), vec![]).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -158,6 +158,6 @@ mod tests {
|
||||
ext.set_storage(b"dog".to_vec(), b"puppy".to_vec());
|
||||
ext.set_storage(b"dogglesworth".to_vec(), b"cat".to_vec());
|
||||
const ROOT: [u8; 32] = hex!("0b41e488cccbd67d1f1089592c2c235f5c5399b053f7fe9152dd4b5f279914cd");
|
||||
assert_eq!(ext.storage_root(), H256(ROOT));
|
||||
assert_eq!(ext.storage_root(), H256::from(ROOT));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ pub mod tests {
|
||||
|
||||
#[test]
|
||||
fn storage_root_is_non_default() {
|
||||
assert!(test_trie().storage_root(::std::iter::empty()).0 != H256([0; 32]));
|
||||
assert!(test_trie().storage_root(::std::iter::empty()).0 != H256::repeat_byte(0));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user