mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 19:21:13 +00:00
Merge branch 'master' into update-artifacts-1748824488
This commit is contained in:
@@ -72,7 +72,7 @@ async fn storage_n_mapish_key_is_properly_created() -> Result<(), subxt::Error>
|
||||
// This is what the generated code hashes a `session().key_owner(..)` key into:
|
||||
let actual_key = node_runtime::storage()
|
||||
.session()
|
||||
.key_owner(KeyTypeId([1, 2, 3, 4]), vec![5, 6, 7, 8]);
|
||||
.key_owner((KeyTypeId([1, 2, 3, 4]), vec![5, 6, 7, 8]));
|
||||
let actual_key_bytes = api.storage().address_bytes(&actual_key)?;
|
||||
|
||||
// Let's manually hash to what we assume it should be and compare:
|
||||
@@ -80,13 +80,12 @@ async fn storage_n_mapish_key_is_properly_created() -> Result<(), subxt::Error>
|
||||
// Hash the prefix to the storage entry:
|
||||
let mut bytes = sp_core::twox_128("Session".as_bytes()).to_vec();
|
||||
bytes.extend(&sp_core::twox_128("KeyOwner".as_bytes())[..]);
|
||||
// Both keys, use twox64_concat hashers:
|
||||
let key1 = [1u8, 2, 3, 4].encode();
|
||||
let key2 = vec![5u8, 6, 7, 8].encode();
|
||||
bytes.extend(sp_core::twox_64(&key1));
|
||||
bytes.extend(&key1);
|
||||
bytes.extend(sp_core::twox_64(&key2));
|
||||
bytes.extend(&key2);
|
||||
// Key is a tuple of 2 args, so encode each arg and then hash the concatenation:
|
||||
let mut key_bytes = vec![];
|
||||
[1u8, 2, 3, 4].encode_to(&mut key_bytes);
|
||||
vec![5u8, 6, 7, 8].encode_to(&mut key_bytes);
|
||||
bytes.extend(sp_core::twox_64(&key_bytes));
|
||||
bytes.extend(&key_bytes);
|
||||
bytes
|
||||
};
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ impl SubstrateNodeBuilder {
|
||||
) -> Result<Child, std::io::Error> {
|
||||
let mut cmd = Command::new(binary_path);
|
||||
|
||||
cmd.env("RUST_LOG", "info,libp2p_tcp=debug")
|
||||
cmd.env("RUST_LOG", "info,libp2p_tcp=debug,litep2p::tcp=debug")
|
||||
.stdout(process::Stdio::piped())
|
||||
.stderr(process::Stdio::piped())
|
||||
.arg("--dev")
|
||||
@@ -295,6 +295,14 @@ fn try_find_substrate_port_from_output(r: impl Read + Send + 'static) -> Substra
|
||||
.rsplit_once("New listen address: /ip4/127.0.0.1/tcp/")
|
||||
// slightly newer message:
|
||||
.or_else(|| line.rsplit_once("New listen address address=/ip4/127.0.0.1/tcp/"))
|
||||
// Newest message using the litep2p backend:
|
||||
.or_else(|| {
|
||||
// The line looks like:
|
||||
// `start tcp transport listen_addresses=["/ip6/::/tcp/30333", "/ip4/0.0.0.0/tcp/30333"]`
|
||||
// we'll split once to find the line itself and then again to find the ipv4 port.
|
||||
line.rsplit_once("start tcp transport listen_addresses=")
|
||||
.and_then(|(_, after)| after.split_once("/ip4/0.0.0.0/tcp/"))
|
||||
})
|
||||
.map(|(_, address_str)| address_str);
|
||||
|
||||
if let Some(line_port) = p2p_port_line {
|
||||
|
||||
@@ -11,9 +11,7 @@ error: Type `Event` does not exist at path `sp_runtime::multiaddress::Event`
|
||||
pallet_grandpa::pallet::Event
|
||||
pallet_treasury::pallet::Event
|
||||
pallet_conviction_voting::pallet::Event
|
||||
pallet_referenda::pallet::Event
|
||||
pallet_ranked_collective::pallet::Event
|
||||
pallet_referenda::pallet::Event
|
||||
pallet_whitelist::pallet::Event
|
||||
polkadot_runtime_common::claims::pallet::Event
|
||||
pallet_utility::pallet::Event
|
||||
|
||||
Reference in New Issue
Block a user