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:
Andrew Jones
2021-03-03 12:20:17 +00:00
committed by GitHub
parent d6bc185ed3
commit fb649f19c2
7 changed files with 313 additions and 247 deletions
+303 -241
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -149,7 +149,7 @@ impl BlockAnnounceData {
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,
None => {
tracing::debug!(
+2 -2
View File
@@ -141,7 +141,7 @@ async fn make_gossip_message_and_header(
&keystore,
statement,
&signing_context,
validator_index,
validator_index.into(),
&alice_public.into(),
)
.await
@@ -259,7 +259,7 @@ fn check_statement_seconded() {
&keystore,
statement,
&signing_context,
0,
0.into(),
&alice_public.into(),
))
.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"]}
serde = { version = "1.0.101", optional = true, features = ["derive"] }
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 }
trie-db = { version = "0.22.0", default-features = false }
environmental = { version = "1.1.2", default-features = false }
@@ -62,6 +63,7 @@ std = [
"sp-io/std",
"sp-std/std",
"hash-db/std",
"log/std",
"memory-db/std",
"trie-db/std",
"sp-state-machine/std",
+1 -1
View File
@@ -201,7 +201,7 @@ decl_module! {
relay_chain_state
)
.map_err(|err| {
frame_support::debug::print!("invalid relay chain merkle proof: {:?}", err);
log::debug!("invalid relay chain merkle proof: {:?}", err);
Error::<T>::InvalidRelayChainMerkleProof
})?;
+2
View File
@@ -7,6 +7,7 @@ edition = "2018"
[dependencies]
# Other dependencies
codec = { package = "parity-scale-codec", version = "2.0.0", features = [ "derive" ], default-features = false }
log = { version = "0.4.14", default-features = false }
# Substrate Dependencies
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" ]
std = [
"codec/std",
"log/std",
"sp-std/std",
"frame-support/std",
"frame-system/std",
+2 -2
View File
@@ -104,7 +104,7 @@ decl_module! {
impl<T: Config> DownwardMessageHandler for Module<T> {
fn handle_downward_message(msg: InboundDownwardMessage) {
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) {
Ok(Ok(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> {
fn handle_hrmp_message(sender: ParaId, msg: InboundHrmpMessage) {
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) {
Ok(Ok(xcm)) => {
let location = (