Skip to content

feat: k2pow service #1219

feat: k2pow service

feat: k2pow service #1219

Triggered via pull request September 17, 2024 13:46
@acudacud
synchronize #362
k2pow-serv
Status Failure
Total duration 1m 25s
Artifacts

ci.yml

on: pull_request
Matrix: Test Suite
Matrix: Build library
Publish release
0s
Publish release
Fit to window
Zoom out
Zoom in

Annotations

4 errors and 12 warnings
can't compare `[u8]` with `[u8; 32]`: scrypt-ocl/src/lib.rs#L123
error[E0277]: can't compare `[u8]` with `[u8; 32]` --> scrypt-ocl/src/lib.rs:123:18 | 123 | if label < &difficulty { | ^ no implementation for `[u8] < [u8; 32]` and `[u8] > [u8; 32]` | = help: the trait `std::cmp::PartialOrd<[u8; 32]>` is not implemented for `[u8]`, which is required by `&[u8]: std::cmp::PartialOrd<&[u8; 32]>` = help: the following other types implement trait `std::cmp::PartialOrd<Rhs>`: `&[u8]` implements `std::cmp::PartialOrd<bytes::bytes::Bytes>` `&[u8]` implements `std::cmp::PartialOrd<bytes::bytes_mut::BytesMut>` `[u8]` implements `std::cmp::PartialOrd<bytes::bytes::Bytes>` `[u8]` implements `std::cmp::PartialOrd<bytes::bytes_mut::BytesMut>` `[u8]` implements `std::cmp::PartialOrd<http::header::value::HeaderValue>` = note: required for `&[u8]` to implement `std::cmp::PartialOrd<&[u8; 32]>`
clippy
Clippy had exited with the 101 exit code
Check
Process completed with exit code 101.
coverage
Process completed with exit code 1.
unneeded late initialization: src/prove.rs#L163
warning: unneeded late initialization --> src/prove.rs:163:9 | 163 | let ciphers: Vec<AesCipher>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init = note: `#[warn(clippy::needless_late_init)]` on by default help: move the declaration `ciphers` here and remove the assignments from the `match` arms | 163 ~ 164 ~ let ciphers: Vec<AesCipher> = match pow_prover.par() { 165 | true => { 166 ~ nonce_group_range(nonces.clone(), Self::NONCES_PER_AES) 167 | .into_par_iter() 168 | .map(map_fn) 169 ~ .collect::<eyre::Result<_>>()? 170 | } 171 | false => { 172 ~ nonce_group_range(nonces.clone(), Self::NONCES_PER_AES) 173 | .map(map_fn) 174 ~ .collect::<eyre::Result<_>>()? |
unneeded `return` statement: src/pow/randomx.rs#L127
warning: unneeded `return` statement --> src/pow/randomx.rs:127:48 | 127 | Some(std::cmp::Ordering::Equal) => return Err(Error::InvalidPoW), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 127 | Some(std::cmp::Ordering::Equal) => Err(Error::InvalidPoW), | ~~~~~~~~~~~~~~~~~~~~~~
unneeded `return` statement: src/pow/randomx.rs#L126
warning: unneeded `return` statement --> src/pow/randomx.rs:126:50 | 126 | Some(std::cmp::Ordering::Greater) => return Err(Error::InvalidPoW), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return = note: `#[warn(clippy::needless_return)]` on by default help: remove `return` | 126 | Some(std::cmp::Ordering::Greater) => Err(Error::InvalidPoW), | ~~~~~~~~~~~~~~~~~~~~~~
associated function `new` is never used: src/pow/service.rs#L10
warning: associated function `new` is never used --> src/pow/service.rs:10:12 | 9 | impl K2powService { | ----------------- associated function in this implementation 10 | pub fn new(k2pow_service: &'static str) -> Self { | ^^^
struct `K2powService` is never constructed: src/pow/service.rs#L5
warning: struct `K2powService` is never constructed --> src/pow/service.rs:5:8 | 5 | struct K2powService { | ^^^^^^^^^^^^
constant `FORMAT_PATH` is never used: src/pow/service.rs#L3
warning: constant `FORMAT_PATH` is never used --> src/pow/service.rs:3:7 | 3 | const FORMAT_PATH: &str = "/job/:miner/:nonce_group/:challenge/:difficulty"; | ^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
unused variable: `miner_id`: src/pow/service.rs#L21
warning: unused variable: `miner_id` --> src/pow/service.rs:21:9 | 21 | miner_id: &[u8; 32], | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_miner_id`
unused variable: `difficulty`: src/pow/service.rs#L20
warning: unused variable: `difficulty` --> src/pow/service.rs:20:9 | 20 | difficulty: &[u8; 32], | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_difficulty`
unused variable: `challenge`: src/pow/service.rs#L19
warning: unused variable: `challenge` --> src/pow/service.rs:19:9 | 19 | challenge: &[u8; 8], | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_challenge`
unused variable: `nonce_group`: src/pow/service.rs#L18
warning: unused variable: `nonce_group` --> src/pow/service.rs:18:9 | 18 | nonce_group: u8, | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_nonce_group` | = note: `#[warn(unused_variables)]` on by default
clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
clippy
The following actions use a deprecated Node.js version and will be forced to run on node20: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/