Update to substrate polkadot-v0.9.42

This commit is contained in:
Luke Parker 2023-05-01 03:17:37 -04:00
parent 6032af6692
commit c0001f5ff2
No known key found for this signature in database
3 changed files with 384 additions and 344 deletions

720
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -69,6 +69,7 @@ pub fn new_partial(config: &Configuration) -> Result<PartialComponents, ServiceE
})
.transpose()?;
#[allow(deprecated)]
let executor = Executor::new(
config.wasm_method,
config.default_heap_pages,
@ -115,7 +116,7 @@ pub fn new_partial(config: &Configuration) -> Result<PartialComponents, ServiceE
)?;
let slot_duration = babe_link.config().slot_duration();
let import_queue = sc_consensus_babe::import_queue(
let (import_queue, babe_handle) = sc_consensus_babe::import_queue(
babe_link.clone(),
block_import.clone(),
Some(Box::new(justification_import)),
@ -126,6 +127,10 @@ pub fn new_partial(config: &Configuration) -> Result<PartialComponents, ServiceE
config.prometheus_registry(),
telemetry.as_ref().map(Telemetry::handle),
)?;
// This can't be dropped, or BABE breaks
// We don't have anything to do with it though
// This won't grow in size, so forgetting this isn't a disastrous memleak
std::mem::forget(babe_handle);
Ok(sc_service::PartialComponents {
client,

View file

@ -1,5 +1,6 @@
#![cfg_attr(not(feature = "std"), no_std)]
#[allow(deprecated, clippy::let_unit_value)] // TODO
#[frame_support::pallet]
pub mod pallet {
use scale_info::TypeInfo;