Bump Substrate (#796)

* Bump Substrate to version used by Polkadot (`5f056830`)

* Use `log` crate for runtime logging

See https://github.com/paritytech/substrate/pull/8128/ for more info.

* Stop using return value from `execute_block`

* Update test weight
This commit is contained in:
Hernando Castano
2021-03-08 11:55:51 -05:00
committed by Bastian Köcher
parent afb48a547e
commit f7c3bd4e08
19 changed files with 91 additions and 77 deletions
+3 -3
View File
@@ -81,7 +81,7 @@ impl MaybeLockFundsTransaction for EthTransaction {
// we only accept transactions sending funds directly to the pre-configured address
if tx.unsigned.to != Some(LOCK_FUNDS_ADDRESS.into()) {
frame_support::debug::trace!(
log::trace!(
target: "runtime",
"Failed to parse fund locks transaction. Invalid peer recipient: {:?}",
tx.unsigned.to,
@@ -94,7 +94,7 @@ impl MaybeLockFundsTransaction for EthTransaction {
match tx.unsigned.payload.len() {
32 => recipient_raw.as_fixed_bytes_mut().copy_from_slice(&tx.unsigned.payload),
len => {
frame_support::debug::trace!(
log::trace!(
target: "runtime",
"Failed to parse fund locks transaction. Invalid recipient length: {}",
len,
@@ -106,7 +106,7 @@ impl MaybeLockFundsTransaction for EthTransaction {
let amount = tx.unsigned.value.low_u128();
if tx.unsigned.value != amount.into() {
frame_support::debug::trace!(
log::trace!(
target: "runtime",
"Failed to parse fund locks transaction. Invalid amount: {}",
tx.unsigned.value,
+4 -4
View File
@@ -290,7 +290,7 @@ impl bp_currency_exchange::DepositInto for DepositInto {
// - deposited != 0: (should never happen in practice) deposit has been partially completed
match deposited_amount {
_ if deposited_amount == amount => {
frame_support::debug::trace!(
log::trace!(
target: "runtime",
"Deposited {} to {:?}",
amount,
@@ -300,7 +300,7 @@ impl bp_currency_exchange::DepositInto for DepositInto {
Ok(())
}
_ if deposited_amount == 0 => {
frame_support::debug::error!(
log::error!(
target: "runtime",
"Deposit of {} to {:?} has failed",
amount,
@@ -310,7 +310,7 @@ impl bp_currency_exchange::DepositInto for DepositInto {
Err(bp_currency_exchange::Error::DepositFailed)
}
_ => {
frame_support::debug::error!(
log::error!(
target: "runtime",
"Deposit of {} to {:?} has partially competed. {} has been deposited",
amount,
@@ -535,7 +535,7 @@ impl_runtime_apis! {
}
fn execute_block(block: Block) {
Executive::execute_block(block)
Executive::execute_block(block);
}
fn initialize_block(header: &<Block as BlockT>::Header) {