Rename Hashing Trait to Hash (#288)

This commit is contained in:
Benjamin Kampmann
2018-07-10 10:05:53 +02:00
committed by Gav Wood
parent 9957d26967
commit a876d656bd
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -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();
+2 -2
View File
@@ -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[..])
} }
} }
+1 -1
View File
@@ -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};
+1 -1
View File
@@ -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};