Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
polkadot
Commits
b161a87c
Commit
b161a87c
authored
Jul 10, 2018
by
Benjamin Kampmann
Committed by
Gav Wood
Jul 10, 2018
Browse files
Rename Hashing Trait to Hash (#288)
parent
2579eb80
Changes
4
Hide whitespace changes
Inline
Side-by-side
consensus/src/lib.rs
View file @
b161a87c
...
...
@@ -661,7 +661,7 @@ pub struct CreateProposal<C: PolkadotApi> {
impl
<
C
>
CreateProposal
<
C
>
where
C
:
PolkadotApi
{
fn
propose_with
(
&
self
,
candidates
:
Vec
<
CandidateReceipt
>
)
->
Result
<
Block
,
Error
>
{
use
polkadot_api
::
BlockBuilder
;
use
runtime_primitives
::
traits
::{
Hash
ing
,
BlakeTwo256
};
use
runtime_primitives
::
traits
::{
Hash
as
HashT
,
BlakeTwo256
};
// TODO: handle case when current timestamp behind that in state.
let
timestamp
=
current_timestamp
();
...
...
primitives/src/parachain.rs
View file @
b161a87c
...
...
@@ -192,7 +192,7 @@ impl CandidateReceipt {
/// Get the blake2_256 hash
#[cfg(feature
=
"std"
)]
pub
fn
hash
(
&
self
)
->
Hash
{
use
runtime_primitives
::
traits
::{
BlakeTwo256
,
Hash
ing
};
use
runtime_primitives
::
traits
::{
BlakeTwo256
,
Hash
};
BlakeTwo256
::
hash_of
(
self
)
}
}
...
...
@@ -247,7 +247,7 @@ impl BlockData {
/// Compute hash of block data.
#[cfg(feature
=
"std"
)]
pub
fn
hash
(
&
self
)
->
Hash
{
use
runtime_primitives
::
traits
::{
BlakeTwo256
,
Hash
ing
};
use
runtime_primitives
::
traits
::{
BlakeTwo256
,
Hash
};
BlakeTwo256
::
hash
(
&
self
.0
[
..
])
}
}
...
...
runtime/src/parachains.rs
View file @
b161a87c
...
...
@@ -19,7 +19,7 @@
use
rstd
::
prelude
::
*
;
use
codec
::
Slicable
;
use
runtime_primitives
::
traits
::{
Hash
ing
,
BlakeTwo256
,
Executable
,
RefInto
,
MaybeEmpty
};
use
runtime_primitives
::
traits
::{
Hash
,
BlakeTwo256
,
Executable
,
RefInto
,
MaybeEmpty
};
use
primitives
::
parachain
::{
Id
,
Chain
,
DutyRoster
,
CandidateReceipt
};
use
{
system
,
session
};
...
...
transaction-pool/src/lib.rs
View file @
b161a87c
...
...
@@ -49,7 +49,7 @@ use extrinsic_pool::api::ExtrinsicPool;
use
polkadot_api
::
PolkadotApi
;
use
primitives
::{
AccountId
,
BlockId
,
Hash
,
Index
,
UncheckedExtrinsic
as
FutureProofUncheckedExtrinsic
};
use
runtime
::{
Address
,
UncheckedExtrinsic
};
use
substrate_runtime_primitives
::
traits
::{
Bounded
,
Checkable
,
Hash
ing
,
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
error
::{
Error
,
ErrorKind
,
Result
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment