mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-24 21:45:41 +00:00
Update to latest Substrate and Polkadot (#348)
* Update to latest Substrate and Polkadot * log::debug! * Add log dependecies to runtime * Comma * Fix tests
This commit is contained in:
Generated
+303
-241
File diff suppressed because it is too large
Load Diff
@@ -149,7 +149,7 @@ impl BlockAnnounceData {
|
|||||||
return Err(BlockAnnounceError(format!("{:?}", e)));
|
return Err(BlockAnnounceError(format!("{:?}", e)));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let signer = match authorities.get(validator_index as usize) {
|
let signer = match authorities.get(validator_index.0 as usize) {
|
||||||
Some(r) => r,
|
Some(r) => r,
|
||||||
None => {
|
None => {
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ async fn make_gossip_message_and_header(
|
|||||||
&keystore,
|
&keystore,
|
||||||
statement,
|
statement,
|
||||||
&signing_context,
|
&signing_context,
|
||||||
validator_index,
|
validator_index.into(),
|
||||||
&alice_public.into(),
|
&alice_public.into(),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
@@ -259,7 +259,7 @@ fn check_statement_seconded() {
|
|||||||
&keystore,
|
&keystore,
|
||||||
statement,
|
statement,
|
||||||
&signing_context,
|
&signing_context,
|
||||||
0,
|
0.into(),
|
||||||
&alice_public.into(),
|
&alice_public.into(),
|
||||||
))
|
))
|
||||||
.ok()
|
.ok()
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ sp-externalities = { git = "https://github.com/paritytech/substrate", default-fe
|
|||||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"]}
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"]}
|
||||||
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
||||||
hash-db = { version = "0.15.2", default-features = false }
|
hash-db = { version = "0.15.2", default-features = false }
|
||||||
|
log = { version = "0.4.14", default-features = false }
|
||||||
memory-db = { version = "0.26.0", default-features = false }
|
memory-db = { version = "0.26.0", default-features = false }
|
||||||
trie-db = { version = "0.22.0", default-features = false }
|
trie-db = { version = "0.22.0", default-features = false }
|
||||||
environmental = { version = "1.1.2", default-features = false }
|
environmental = { version = "1.1.2", default-features = false }
|
||||||
@@ -62,6 +63,7 @@ std = [
|
|||||||
"sp-io/std",
|
"sp-io/std",
|
||||||
"sp-std/std",
|
"sp-std/std",
|
||||||
"hash-db/std",
|
"hash-db/std",
|
||||||
|
"log/std",
|
||||||
"memory-db/std",
|
"memory-db/std",
|
||||||
"trie-db/std",
|
"trie-db/std",
|
||||||
"sp-state-machine/std",
|
"sp-state-machine/std",
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ decl_module! {
|
|||||||
relay_chain_state
|
relay_chain_state
|
||||||
)
|
)
|
||||||
.map_err(|err| {
|
.map_err(|err| {
|
||||||
frame_support::debug::print!("invalid relay chain merkle proof: {:?}", err);
|
log::debug!("invalid relay chain merkle proof: {:?}", err);
|
||||||
Error::<T>::InvalidRelayChainMerkleProof
|
Error::<T>::InvalidRelayChainMerkleProof
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ edition = "2018"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
# Other dependencies
|
# Other dependencies
|
||||||
codec = { package = "parity-scale-codec", version = "2.0.0", features = [ "derive" ], default-features = false }
|
codec = { package = "parity-scale-codec", version = "2.0.0", features = [ "derive" ], default-features = false }
|
||||||
|
log = { version = "0.4.14", default-features = false }
|
||||||
|
|
||||||
# Substrate Dependencies
|
# Substrate Dependencies
|
||||||
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||||
@@ -23,6 +24,7 @@ cumulus-primitives-core = { path = "../../primitives/core", default-features = f
|
|||||||
default = [ "std" ]
|
default = [ "std" ]
|
||||||
std = [
|
std = [
|
||||||
"codec/std",
|
"codec/std",
|
||||||
|
"log/std",
|
||||||
"sp-std/std",
|
"sp-std/std",
|
||||||
"frame-support/std",
|
"frame-support/std",
|
||||||
"frame-system/std",
|
"frame-system/std",
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ decl_module! {
|
|||||||
impl<T: Config> DownwardMessageHandler for Module<T> {
|
impl<T: Config> DownwardMessageHandler for Module<T> {
|
||||||
fn handle_downward_message(msg: InboundDownwardMessage) {
|
fn handle_downward_message(msg: InboundDownwardMessage) {
|
||||||
let hash = msg.using_encoded(T::Hashing::hash);
|
let hash = msg.using_encoded(T::Hashing::hash);
|
||||||
frame_support::debug::print!("Processing Downward XCM: {:?}", &hash);
|
log::debug!("Processing Downward XCM: {:?}", &hash);
|
||||||
let event = match VersionedXcm::decode(&mut &msg.msg[..]).map(Xcm::try_from) {
|
let event = match VersionedXcm::decode(&mut &msg.msg[..]).map(Xcm::try_from) {
|
||||||
Ok(Ok(xcm)) => {
|
Ok(Ok(xcm)) => {
|
||||||
match T::XcmExecutor::execute_xcm(Junction::Parent.into(), xcm) {
|
match T::XcmExecutor::execute_xcm(Junction::Parent.into(), xcm) {
|
||||||
@@ -122,7 +122,7 @@ impl<T: Config> DownwardMessageHandler for Module<T> {
|
|||||||
impl<T: Config> HrmpMessageHandler for Module<T> {
|
impl<T: Config> HrmpMessageHandler for Module<T> {
|
||||||
fn handle_hrmp_message(sender: ParaId, msg: InboundHrmpMessage) {
|
fn handle_hrmp_message(sender: ParaId, msg: InboundHrmpMessage) {
|
||||||
let hash = msg.using_encoded(T::Hashing::hash);
|
let hash = msg.using_encoded(T::Hashing::hash);
|
||||||
frame_support::debug::print!("Processing HRMP XCM: {:?}", &hash);
|
log::debug!("Processing HRMP XCM: {:?}", &hash);
|
||||||
let event = match VersionedXcm::decode(&mut &msg.data[..]).map(Xcm::try_from) {
|
let event = match VersionedXcm::decode(&mut &msg.data[..]).map(Xcm::try_from) {
|
||||||
Ok(Ok(xcm)) => {
|
Ok(Ok(xcm)) => {
|
||||||
let location = (
|
let location = (
|
||||||
|
|||||||
Reference in New Issue
Block a user