mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 16:21:02 +00:00
Rename Hashing Trait to Hash (#288)
This commit is contained in:
committed by
Gav Wood
parent
9957d26967
commit
a876d656bd
@@ -661,7 +661,7 @@ pub struct CreateProposal<C: PolkadotApi> {
|
|||||||
impl<C> CreateProposal<C> where C: PolkadotApi {
|
impl<C> CreateProposal<C> where C: PolkadotApi {
|
||||||
fn propose_with(&self, candidates: Vec<CandidateReceipt>) -> Result<Block, Error> {
|
fn propose_with(&self, candidates: Vec<CandidateReceipt>) -> Result<Block, Error> {
|
||||||
use polkadot_api::BlockBuilder;
|
use polkadot_api::BlockBuilder;
|
||||||
use runtime_primitives::traits::{Hashing, BlakeTwo256};
|
use runtime_primitives::traits::{Hash as HashT, BlakeTwo256};
|
||||||
|
|
||||||
// TODO: handle case when current timestamp behind that in state.
|
// TODO: handle case when current timestamp behind that in state.
|
||||||
let timestamp = current_timestamp();
|
let timestamp = current_timestamp();
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ impl CandidateReceipt {
|
|||||||
/// Get the blake2_256 hash
|
/// Get the blake2_256 hash
|
||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
pub fn hash(&self) -> Hash {
|
pub fn hash(&self) -> Hash {
|
||||||
use runtime_primitives::traits::{BlakeTwo256, Hashing};
|
use runtime_primitives::traits::{BlakeTwo256, Hash};
|
||||||
BlakeTwo256::hash_of(self)
|
BlakeTwo256::hash_of(self)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -247,7 +247,7 @@ impl BlockData {
|
|||||||
/// Compute hash of block data.
|
/// Compute hash of block data.
|
||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
pub fn hash(&self) -> Hash {
|
pub fn hash(&self) -> Hash {
|
||||||
use runtime_primitives::traits::{BlakeTwo256, Hashing};
|
use runtime_primitives::traits::{BlakeTwo256, Hash};
|
||||||
BlakeTwo256::hash(&self.0[..])
|
BlakeTwo256::hash(&self.0[..])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
use rstd::prelude::*;
|
use rstd::prelude::*;
|
||||||
use codec::Slicable;
|
use codec::Slicable;
|
||||||
|
|
||||||
use runtime_primitives::traits::{Hashing, BlakeTwo256, Executable, RefInto, MaybeEmpty};
|
use runtime_primitives::traits::{Hash, BlakeTwo256, Executable, RefInto, MaybeEmpty};
|
||||||
use primitives::parachain::{Id, Chain, DutyRoster, CandidateReceipt};
|
use primitives::parachain::{Id, Chain, DutyRoster, CandidateReceipt};
|
||||||
use {system, session};
|
use {system, session};
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ use extrinsic_pool::api::ExtrinsicPool;
|
|||||||
use polkadot_api::PolkadotApi;
|
use polkadot_api::PolkadotApi;
|
||||||
use primitives::{AccountId, BlockId, Hash, Index, UncheckedExtrinsic as FutureProofUncheckedExtrinsic};
|
use primitives::{AccountId, BlockId, Hash, Index, UncheckedExtrinsic as FutureProofUncheckedExtrinsic};
|
||||||
use runtime::{Address, UncheckedExtrinsic};
|
use runtime::{Address, UncheckedExtrinsic};
|
||||||
use substrate_runtime_primitives::traits::{Bounded, Checkable, Hashing, BlakeTwo256};
|
use substrate_runtime_primitives::traits::{Bounded, Checkable, Hash as HashT, BlakeTwo256};
|
||||||
|
|
||||||
pub use extrinsic_pool::txpool::{Options, Status, LightStatus, VerifiedTransaction as VerifiedTransactionOps};
|
pub use extrinsic_pool::txpool::{Options, Status, LightStatus, VerifiedTransaction as VerifiedTransactionOps};
|
||||||
pub use error::{Error, ErrorKind, Result};
|
pub use error::{Error, ErrorKind, Result};
|
||||||
|
|||||||
Reference in New Issue
Block a user