mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 10:31:03 +00:00
Companion for init the RuntimeLogger automatically (#2522)
* Lol * Add the features * Remove some more runtime logger init calls * Make companion check work * Revert "Make companion check work" This reverts commit a255c798076466c0fa20a4db713fc712772c2b4d. * Update Substrate
This commit is contained in:
@@ -8,7 +8,7 @@ build = "build.rs"
|
||||
[dependencies]
|
||||
bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] }
|
||||
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
log = { version = "0.4.13", optional = true }
|
||||
log = { version = "0.4.14", default-features = false }
|
||||
rustc-hex = { version = "2.1.0", default-features = false }
|
||||
serde = { version = "1.0.123", default-features = false }
|
||||
serde_derive = { version = "1.0.117", optional = true }
|
||||
@@ -145,7 +145,7 @@ std = [
|
||||
"pallet-vesting/std",
|
||||
"serde_derive",
|
||||
"serde/std",
|
||||
"log",
|
||||
"log/std",
|
||||
"pallet-babe/std",
|
||||
"babe-primitives/std",
|
||||
"sp-session/std",
|
||||
@@ -194,3 +194,10 @@ try-runtime = [
|
||||
# runtime without clashing with the runtime api exported functions
|
||||
# in WASM.
|
||||
disable-runtime-api = []
|
||||
|
||||
# A feature that should be enabled when the runtime should be build for on-chain
|
||||
# deployment. This will disable stuff that shouldn't be part of the on-chain wasm
|
||||
# to make it smaller like logging for example.
|
||||
on-chain-release-build = [
|
||||
"sp-api/disable-logging",
|
||||
]
|
||||
|
||||
@@ -56,7 +56,7 @@ use sp_version::NativeVersion;
|
||||
use sp_core::OpaqueMetadata;
|
||||
use sp_staking::SessionIndex;
|
||||
use frame_support::{
|
||||
parameter_types, construct_runtime, debug, RuntimeDebug,
|
||||
parameter_types, construct_runtime, RuntimeDebug,
|
||||
traits::{KeyOwnerProofSystem, Randomness, LockIdentifier, Filter, InstanceFilter},
|
||||
weights::Weight,
|
||||
};
|
||||
@@ -64,7 +64,7 @@ use frame_system::{EnsureRoot, EnsureOneOf};
|
||||
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
|
||||
use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
|
||||
use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};
|
||||
use pallet_session::{historical as session_historical};
|
||||
use pallet_session::historical as session_historical;
|
||||
use static_assertions::const_assert;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
@@ -696,7 +696,7 @@ impl<LocalCall> frame_system::offchain::CreateSignedTransaction<LocalCall> for R
|
||||
pallet_transaction_payment::ChargeTransactionPayment::<Runtime>::from(tip),
|
||||
);
|
||||
let raw_payload = SignedPayload::new(call, extra).map_err(|e| {
|
||||
debug::warn!("Unable to create signed payload: {:?}", e);
|
||||
log::warn!("Unable to create signed payload: {:?}", e);
|
||||
}).ok()?;
|
||||
let signature = raw_payload.using_encoded(|payload| {
|
||||
C::sign(payload, public)
|
||||
@@ -1318,7 +1318,6 @@ sp_api::impl_runtime_apis! {
|
||||
#[cfg(feature = "try-runtime")]
|
||||
impl frame_try_runtime::TryRuntime<Block> for Runtime {
|
||||
fn on_runtime_upgrade() -> Result<(Weight, Weight), sp_runtime::RuntimeString> {
|
||||
frame_support::debug::RuntimeLogger::init();
|
||||
let weight = Executive::try_runtime_upgrade()?;
|
||||
Ok((weight, BlockWeights::get().max_block))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user