Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.37.0
toolchain: 1.39.0
override: true
- run: cargo fetch --verbose
- run: cargo build --release
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cargo-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2019-10-13
toolchain: nightly-2019-11-06
override: true
- run: rustup component add clippy
- run: cargo fetch --verbose
Expand All @@ -23,7 +23,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2019-10-13
toolchain: nightly-2019-11-06
override: true
- run: rustup component add rustfmt
- run: cargo fmt -- --check
Expand All @@ -38,7 +38,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.37.0
toolchain: 1.39.0
override: true
- run: cargo fetch --verbose
- run: cargo build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/yarn-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '10.x'
node-version: '12.x'
- run: npm install yarn
- working-directory: ./test
run: yarn
Expand Down
18 changes: 9 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: rust
rust:
- 1.37.0
- 1.39.0
stages:
- name: test
if: branch != docker-build
Expand All @@ -16,8 +16,8 @@ jobs:
- SKIP=`.travis/check-mergify-merge` && if [[ "$SKIP" = "skip" ]]; then exit 0; fi
- SKIP=`.travis/check-change '(^spec/|\.md$)'` && if [[ "$SKIP" = "skip" ]]; then exit 0; fi
install:
- nvm install 10
- nvm use 10
- nvm install 12
- nvm use 12
- npm install -g yarn
before_script:
- cargo fetch --verbose
Expand All @@ -34,8 +34,8 @@ jobs:
- SKIP=`.travis/check-mergify-merge` && if [[ "$SKIP" = "skip" ]]; then exit 0; fi
- SKIP=`.travis/check-change '^spec/|\.md$'` && if [[ "$SKIP" = "skip" ]]; then exit 0; fi
install:
- nvm install 10
- nvm use 10
- nvm install 12
- nvm use 12
- npm install -g yarn
before_script:
- cargo fetch --verbose
Expand All @@ -52,8 +52,8 @@ jobs:
- SKIP=`.travis/check-mergify-merge` && if [[ "$SKIP" = "skip" ]]; then exit 0; fi
- SKIP=`.travis/check-change '^spec/|\.md$'` && if [[ "$SKIP" = "skip" ]]; then exit 0; fi
install:
- nvm install 10
- nvm use 10
- nvm install 12
- nvm use 12
- npm install -g yarn
before_script:
- cargo build --verbose
Expand All @@ -68,8 +68,8 @@ jobs:
- SKIP=`.travis/check-mergify-merge` && if [[ "$SKIP" = "skip" ]]; then exit 0; fi
- SKIP=`.travis/check-change '^spec/|\.md$'` && if [[ "$SKIP" = "skip" ]]; then exit 0; fi
install:
- nvm install 10
- nvm use 10
- nvm install 12
- nvm use 12
- npm install -g yarn
before_script:
- cargo build --verbose
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ With the methods above, node organizers can manage their local persistent data u
### Building From Source

#### Build Dependencies
CodeChain requires Rust version 1.37.0 to build. Using [rustup](https://rustup.rs/ "rustup URL") is recommended.
CodeChain requires Rust version 1.39.0 to build. Using [rustup](https://rustup.rs/ "rustup URL") is recommended.

- For Linux Systems:
- Ubuntu
Expand Down Expand Up @@ -135,32 +135,32 @@ You can create a block by sending a transaction through [JSON-RPC](https://githu
Make sure you run `rustfmt` before creating a PR to the repo. You need to install the nightly-2018-12-06 version of `rustfmt`.

```sh
rustup toolchain install nightly-2019-10-13
rustup component add rustfmt --toolchain nightly-2019-10-13
rustup toolchain install nightly-2019-11-06
rustup component add rustfmt --toolchain nightly-2019-11-06
```

To run `rustfmt`,

```sh
cargo +nightly-2019-10-13 fmt
cargo +nightly-2019-11-06 fmt
```

## Linting

You should run `clippy` also. This is a lint tool for rust. It suggests more efficient/readable code.
You can see [the clippy document](https://rust-lang.github.io/rust-clippy/master/index.html) for more information.
You need to install the nightly-2019-10-13 version of `clippy`.
You need to install the nightly-2019-11-06 version of `clippy`.

### Install
```sh
rustup toolchain install nightly-2019-10-13
rustup component add clippy --toolchain nightly-2019-10-13
rustup toolchain install nightly-2019-11-06
rustup component add clippy --toolchain nightly-2019-11-06
```

### Run

```sh
cargo +nightly-2019-10-13 clippy --all --all-targets
cargo +nightly-2019-11-06 clippy --all --all-targets
```

## Testing
Expand Down
2 changes: 1 addition & 1 deletion network/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ impl Client {

pub fn extension_versions(&self) -> Vec<(String, Vec<u64>)> {
let extensions = self.extensions.read();
extensions.iter().map(|(name, extension)| (name.to_string(), extension.versions.clone())).collect()
extensions.iter().map(|(name, extension)| ((*name).to_string(), extension.versions.clone())).collect()
}

pub fn on_node_removed(&self, id: &NodeId) {
Expand Down
2 changes: 1 addition & 1 deletion network/src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ impl<Stream: TryRead + TryWrite + PeerAddr + Shutdown> TryStream<Stream> {
Ok(None)
}

fn read_len(&mut self) -> Result<Option<(Vec<u8>)>> {
fn read_len(&mut self) -> Result<Option<Vec<u8>>> {
debug_assert_eq!(None, self.read);
let mut bytes: Vec<u8> = vec![0];

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.37.0
1.39.0
1 change: 0 additions & 1 deletion rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ reorder_modules = true
# reorder_impl_items = false
# report_todo = "Never"
# report_fixme = "Never"
# skip_children = false
space_after_colon = true
space_before_colon = false
struct_field_align_threshold = 0
Expand Down
8 changes: 4 additions & 4 deletions test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"author": "CodeChain Team <hi@codechain.io>",
"license": "AGPL-3.0",
"engines": {
"node": ">=10",
"node": ">=12",
"yarn": "^1.10.0"
},
"scripts": {
Expand Down Expand Up @@ -37,11 +37,11 @@
"@types/snappy": "^6.0.0",
"mocha": "^6.1.4",
"prettier": "^1.18.2",
"ts-node": "^8.2.0",
"tslint": "^5.17.0",
"ts-node": "^8.4.1",
"tslint": "^5.20.1",
"tslint-config-prettier": "^1.18.0",
"tslint-no-unused-expression-chai": "^0.1.4",
"typescript": "^3.5.1"
"typescript": "^3.7.0"
},
"dependencies": {
"blakejs": "^1.1.0",
Expand Down
Loading