Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use sp-core-hashing directly
  • Loading branch information
yjhmelody committed Mar 3, 2023
commit 7c0a91c7ce96d85e0c937a38ec87d5e8934e71c5
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions frame/alliance/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ scale-info = { version = "2.0.1", default-features = false, features = ["derive"

sp-std = { version = "5.0.0", default-features = false, path = "../../primitives/std" }
sp-core = { version = "7.0.0", default-features = false, path = "../../primitives/core" }
sp-core-hashing = { version = "5.0.0", default-features = false, path = "../../primitives/core/hashing", optional = true }
sp-io = { version = "7.0.0", default-features = false, path = "../../primitives/io" }
sp-runtime = { version = "7.0.0", default-features = false, path = "../../primitives/runtime" }

Expand All @@ -39,7 +40,7 @@ pallet-collective = { version = "4.0.0-dev", path = "../collective" }
[features]
default = ["std"]
std = [
"sp-core/full_crypto",
"sp-core-hashing?/std",
"pallet-collective?/std",
"frame-benchmarking?/std",
"log/std",
Expand All @@ -55,7 +56,7 @@ std = [
]
runtime-benchmarks = [
"array-bytes",
"sp-core/full_crypto",
"sp-core-hashing",
"frame-benchmarking/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"frame-support/runtime-benchmarks",
Expand Down
2 changes: 1 addition & 1 deletion frame/alliance/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fn assert_last_event<T: Config<I>, I: 'static>(generic_event: <T as Config<I>>::
}

fn cid(input: impl AsRef<[u8]>) -> Cid {
let result = sp_core::hashing::sha2_256(input.as_ref());
let result = sp_core_hashing::sha2_256(input.as_ref());
Cid::new_v0(result)
}

Expand Down
2 changes: 1 addition & 1 deletion frame/alliance/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ pub fn new_bench_ext() -> sp_io::TestExternalities {
}

pub fn test_cid() -> Cid {
let result = sp_core::hashing::sha2_256(b"hello world");
let result = sp_core_hashing::sha2_256(b"hello world");
Cid::new_v0(result)
}

Expand Down