mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 08:11:03 +00:00
Fix warnings when compiling runtime. (#4332)
* Remove warnings when compiling runtime. * Remove dispatch::Result imports. * Add missing imports. * Fix missing vecs. #4333 * Fix oom function. * Remove superfluous import. * More warnings.
This commit is contained in:
committed by
Bastian Köcher
parent
057e298b1f
commit
1f84d6d41d
@@ -32,7 +32,7 @@ pub use sp_finality_grandpa as fg_primitives;
|
||||
|
||||
use sp_std::prelude::*;
|
||||
use codec::{self as codec, Encode, Decode, Error};
|
||||
use support::{decl_event, decl_storage, decl_module, dispatch::Result, storage};
|
||||
use support::{decl_event, decl_storage, decl_module, dispatch, storage};
|
||||
use sp_runtime::{
|
||||
generic::{DigestItem, OpaqueDigestItemId}, traits::Zero, Perbill,
|
||||
};
|
||||
@@ -264,7 +264,7 @@ impl<T: Trait> Module<T> {
|
||||
|
||||
/// Schedule GRANDPA to pause starting in the given number of blocks.
|
||||
/// Cannot be done when already paused.
|
||||
pub fn schedule_pause(in_blocks: T::BlockNumber) -> Result {
|
||||
pub fn schedule_pause(in_blocks: T::BlockNumber) -> dispatch::Result {
|
||||
if let StoredState::Live = <State<T>>::get() {
|
||||
let scheduled_at = <system::Module<T>>::block_number();
|
||||
<State<T>>::put(StoredState::PendingPause {
|
||||
@@ -280,7 +280,7 @@ impl<T: Trait> Module<T> {
|
||||
}
|
||||
|
||||
/// Schedule a resume of GRANDPA after pausing.
|
||||
pub fn schedule_resume(in_blocks: T::BlockNumber) -> Result {
|
||||
pub fn schedule_resume(in_blocks: T::BlockNumber) -> dispatch::Result {
|
||||
if let StoredState::Paused = <State<T>>::get() {
|
||||
let scheduled_at = <system::Module<T>>::block_number();
|
||||
<State<T>>::put(StoredState::PendingResume {
|
||||
@@ -313,7 +313,7 @@ impl<T: Trait> Module<T> {
|
||||
next_authorities: AuthorityList,
|
||||
in_blocks: T::BlockNumber,
|
||||
forced: Option<T::BlockNumber>,
|
||||
) -> Result {
|
||||
) -> dispatch::Result {
|
||||
if !<PendingChange<T>>::exists() {
|
||||
let scheduled_at = <system::Module<T>>::block_number();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user