mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 04:37:57 +00:00
Refactor sr_primitives. (#3214)
* refactor sr_primitives. * Fix try build error. * Line-width * Ui test. * Final fixes. * Fix build again. * bring back ui test. * Fix unsigned import. * Another ui fix. * Also refactor substrate-primitives * Fix benchmarks. * Fix doc test. * fix doc tests
This commit is contained in:
committed by
Bastian Köcher
parent
cf80af9255
commit
79feb23a22
@@ -93,7 +93,7 @@ impl_stubs!(
|
||||
[sr25519_verify(&sig, &msg[..], &pubkey) as u8].to_vec()
|
||||
},
|
||||
test_enumerated_trie_root => |_| {
|
||||
enumerated_trie_root::<substrate_primitives::Blake2Hasher>(
|
||||
enumerated_trie_root::<primitives::Blake2Hasher>(
|
||||
&[
|
||||
&b"zero"[..],
|
||||
&b"one"[..],
|
||||
@@ -138,7 +138,7 @@ impl_stubs!(
|
||||
[code].to_vec()
|
||||
},
|
||||
test_offchain_local_storage => |_| {
|
||||
let kind = substrate_primitives::offchain::StorageKind::PERSISTENT;
|
||||
let kind = primitives::offchain::StorageKind::PERSISTENT;
|
||||
assert_eq!(runtime_io::local_storage_get(kind, b"test"), None);
|
||||
runtime_io::local_storage_set(kind, b"test", b"asd");
|
||||
assert_eq!(runtime_io::local_storage_get(kind, b"test"), Some(b"asd".to_vec()));
|
||||
@@ -150,7 +150,7 @@ impl_stubs!(
|
||||
[0].to_vec()
|
||||
},
|
||||
test_offchain_local_storage_with_none => |_| {
|
||||
let kind = substrate_primitives::offchain::StorageKind::PERSISTENT;
|
||||
let kind = primitives::offchain::StorageKind::PERSISTENT;
|
||||
assert_eq!(runtime_io::local_storage_get(kind, b"test"), None);
|
||||
|
||||
let res = runtime_io::local_storage_compare_and_set(kind, b"test", None, b"value");
|
||||
@@ -160,7 +160,7 @@ impl_stubs!(
|
||||
[0].to_vec()
|
||||
},
|
||||
test_offchain_http => |_| {
|
||||
use substrate_primitives::offchain::HttpRequestStatus;
|
||||
use primitives::offchain::HttpRequestStatus;
|
||||
let run = || -> Option<()> {
|
||||
let id = runtime_io::http_request_start("POST", "http://localhost:12345", &[]).ok()?;
|
||||
runtime_io::http_request_add_header(id, "X-Auth", "test").ok()?;
|
||||
|
||||
Reference in New Issue
Block a user