Skip to content

Commit

Permalink
Merge branch 'rc/poc-10'
Browse files Browse the repository at this point in the history
  • Loading branch information
doitian committed Nov 19, 2018
2 parents 7dccff8 + 1deb918 commit ff51a9c
Show file tree
Hide file tree
Showing 114 changed files with 7,389 additions and 2,915 deletions.
737 changes: 251 additions & 486 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ serde_json = "1.0"
crypto = { path = "util/crypto"}
ckb-instrument = { path = "util/instrument", features = ["progress_bar"] }
hash = { path = "util/hash"}
rustc-hex = "1.0"
faster-hex = "0.1"

[features]
integration_test = ["ckb-rpc/integration_test"]
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
test:
RUSTFLAGS="--cfg ckb_test" cargo test --all -- --nocapture
cargo test --all -- --nocapture

build-integration-test:
RUSTFLAGS="--cfg ckb_test" cargo build --all --features integration_test --no-default-features
cargo build --all --features integration_test --no-default-features

doc:
RUSTFLAGS="--cfg ckb_test" cargo doc --all --no-deps
cargo doc --all --no-deps

doc-deps:
RUSTFLAGS="--cfg ckb_test" cargo doc --all
cargo doc --all

check:
RUSTFLAGS="--cfg ckb_test" cargo check --all
cargo check --all

build:
cargo build --release
Expand All @@ -20,7 +20,7 @@ fmt:
cargo fmt --all -- --check

clippy:
RUSTFLAGS="--cfg ckb_test" cargo clippy --all -- -D warnings -D clone_on_ref_ptr -D unused_extern_crates -D enum_glob_use
cargo clippy --all -- -D warnings -D clone_on_ref_ptr -D unused_extern_crates -D enum_glob_use

ci: fmt clippy test build-integration-test
git diff --exit-code Cargo.lock
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ You can run the full test suite, or just run a specific package test:
# Run the full suite
make test
# Run a specific package test
RUSTFLAGS="--cfg ckb_test" cargo test --package ckb-chain
cargo test --package ckb-chain
```

---
Expand Down
2 changes: 1 addition & 1 deletion benches/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors = ["Nervos Core Dev <[email protected]>"]

[dev-dependencies]
criterion = "0.2"
ckb-chain = { path = "../chain" }
ckb-pow = { path = "../pow" }

[[bench]]
name = "cuckoo"
Expand Down
8 changes: 4 additions & 4 deletions benches/benches/cuckoo.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#[macro_use]
extern crate criterion;
extern crate ckb_chain;
extern crate ckb_pow;

use ckb_chain::pow::Cuckoo;
use ckb_pow::Cuckoo;
use criterion::Criterion;

const TESTSET: [([u8; 80], [u32; 6]); 3] = [
Expand Down Expand Up @@ -34,7 +34,7 @@ const TESTSET: [([u8; 80], [u32; 6]); 3] = [

fn bench(c: &mut Criterion) {
c.bench_function("bench_solve", |b| {
let cuckoo = Cuckoo::new(16, 8, 6);
let cuckoo = Cuckoo::new(3, 6);
b.iter(|| {
for _ in 0..100 {
for (message, _) in TESTSET.iter() {
Expand All @@ -45,7 +45,7 @@ fn bench(c: &mut Criterion) {
});

c.bench_function("bench_verify", |b| {
let cuckoo = Cuckoo::new(16, 8, 6);
let cuckoo = Cuckoo::new(3, 6);
b.iter(|| {
for _ in 0..100 {
for (message, proof) in TESTSET.iter() {
Expand Down
Loading

0 comments on commit ff51a9c

Please sign in to comment.