Skip to content

chore: bump bls-signatures to 1.3.3 #2238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion packages/rs-dpp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ authors = [
anyhow = { version = "1.0.81" }
async-trait = { version = "0.1.79" }
base64 = "0.22.1"
bls-signatures = { git = "https://github.com/dashpay/bls-signatures", tag = "v1.3.1", optional = true }
bls-signatures = { git = "https://github.com/dashpay/bls-signatures", tag = "1.3.3", optional = true }
bs58 = "0.5"
byteorder = { version = "1.4" }
chrono = { version = "0.4.35", default-features = false, features = [

Unchanged files with check annotations Beta

pub struct ContainerAttributes {
pub crate_name: String,
pub untagged: bool,
pub unversioned: bool,

Check warning on line 8 in packages/rs-platform-serialization-derive/src/attribute.rs

GitHub Actions / Rust packages (dash-sdk) / Linting

field `unversioned` is never read

warning: field `unversioned` is never read --> packages/rs-platform-serialization-derive/src/attribute.rs:8:9 | 5 | pub struct ContainerAttributes { | ------------------- field in this struct ... 8 | pub unversioned: bool, | ^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default

Check warning on line 8 in packages/rs-platform-serialization-derive/src/attribute.rs

GitHub Actions / Rust packages (dpp) / Linting

field `unversioned` is never read

warning: field `unversioned` is never read --> packages/rs-platform-serialization-derive/src/attribute.rs:8:9 | 5 | pub struct ContainerAttributes { | ------------------- field in this struct ... 8 | pub unversioned: bool, | ^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default

Check warning on line 8 in packages/rs-platform-serialization-derive/src/attribute.rs

GitHub Actions / Rust packages (drive) / Linting

field `unversioned` is never read

warning: field `unversioned` is never read --> packages/rs-platform-serialization-derive/src/attribute.rs:8:9 | 5 | pub struct ContainerAttributes { | ------------------- field in this struct ... 8 | pub unversioned: bool, | ^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default

Check warning on line 8 in packages/rs-platform-serialization-derive/src/attribute.rs

GitHub Actions / Rust packages (drive-abci) / Linting

field `unversioned` is never read

warning: field `unversioned` is never read --> packages/rs-platform-serialization-derive/src/attribute.rs:8:9 | 5 | pub struct ContainerAttributes { | ------------------- field in this struct ... 8 | pub unversioned: bool, | ^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default

Check warning on line 8 in packages/rs-platform-serialization-derive/src/attribute.rs

GitHub Actions / Rust packages (wasm-dpp) / Linting

field `unversioned` is never read

warning: field `unversioned` is never read --> packages/rs-platform-serialization-derive/src/attribute.rs:8:9 | 5 | pub struct ContainerAttributes { | ------------------- field in this struct ... 8 | pub unversioned: bool, | ^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
pub bounds: Option<(String, Literal)>,
pub decode_bounds: Option<(String, Literal)>,
pub borrow_decode_bounds: Option<(String, Literal)>,
pub struct FieldAttributes {
pub with_serde: bool,
pub with_platform_version: bool,
pub platform_version_path_bounds: String,

Check warning on line 114 in packages/rs-platform-serialization-derive/src/attribute.rs

GitHub Actions / Rust packages (dash-sdk) / Linting

field `platform_version_path_bounds` is never read

warning: field `platform_version_path_bounds` is never read --> packages/rs-platform-serialization-derive/src/attribute.rs:114:9 | 111 | pub struct FieldAttributes { | --------------- field in this struct ... 114 | pub platform_version_path_bounds: String, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 114 in packages/rs-platform-serialization-derive/src/attribute.rs

GitHub Actions / Rust packages (dpp) / Linting

field `platform_version_path_bounds` is never read

warning: field `platform_version_path_bounds` is never read --> packages/rs-platform-serialization-derive/src/attribute.rs:114:9 | 111 | pub struct FieldAttributes { | --------------- field in this struct ... 114 | pub platform_version_path_bounds: String, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 114 in packages/rs-platform-serialization-derive/src/attribute.rs

GitHub Actions / Rust packages (drive) / Linting

field `platform_version_path_bounds` is never read

warning: field `platform_version_path_bounds` is never read --> packages/rs-platform-serialization-derive/src/attribute.rs:114:9 | 111 | pub struct FieldAttributes { | --------------- field in this struct ... 114 | pub platform_version_path_bounds: String, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 114 in packages/rs-platform-serialization-derive/src/attribute.rs

GitHub Actions / Rust packages (drive-abci) / Linting

field `platform_version_path_bounds` is never read

warning: field `platform_version_path_bounds` is never read --> packages/rs-platform-serialization-derive/src/attribute.rs:114:9 | 111 | pub struct FieldAttributes { | --------------- field in this struct ... 114 | pub platform_version_path_bounds: String, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 114 in packages/rs-platform-serialization-derive/src/attribute.rs

GitHub Actions / Rust packages (wasm-dpp) / Linting

field `platform_version_path_bounds` is never read

warning: field `platform_version_path_bounds` is never read --> packages/rs-platform-serialization-derive/src/attribute.rs:114:9 | 111 | pub struct FieldAttributes { | --------------- field in this struct ... 114 | pub platform_version_path_bounds: String, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
impl FromAttribute for FieldAttributes {
use crate::drive::{constants, RootTree};
use crate::util::type_constants::DEFAULT_HASH_SIZE_U8;

Check warning on line 2 in packages/rs-drive/src/drive/document/paths.rs

GitHub Actions / Rust packages (dash-sdk) / Linting

unused import: `crate::util::type_constants::DEFAULT_HASH_SIZE_U8`

warning: unused import: `crate::util::type_constants::DEFAULT_HASH_SIZE_U8` --> packages/rs-drive/src/drive/document/paths.rs:2:5 | 2 | use crate::util::type_constants::DEFAULT_HASH_SIZE_U8; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters;

Check warning on line 3 in packages/rs-drive/src/drive/document/paths.rs

GitHub Actions / Rust packages (dash-sdk) / Linting

unused import: `dpp::data_contract::document_type::accessors::DocumentTypeV0Getters`

warning: unused import: `dpp::data_contract::document_type::accessors::DocumentTypeV0Getters` --> packages/rs-drive/src/drive/document/paths.rs:3:5 | 3 | use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
use dpp::data_contract::document_type::methods::DocumentTypeV0Methods;

Check warning on line 4 in packages/rs-drive/src/drive/document/paths.rs

GitHub Actions / Rust packages (dash-sdk) / Linting

unused import: `dpp::data_contract::document_type::methods::DocumentTypeV0Methods`

warning: unused import: `dpp::data_contract::document_type::methods::DocumentTypeV0Methods` --> packages/rs-drive/src/drive/document/paths.rs:4:5 | 4 | use dpp::data_contract::document_type::methods::DocumentTypeV0Methods; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
use dpp::data_contract::document_type::DocumentTypeRef;

Check warning on line 5 in packages/rs-drive/src/drive/document/paths.rs

GitHub Actions / Rust packages (dash-sdk) / Linting

unused import: `dpp::data_contract::document_type::DocumentTypeRef`

warning: unused import: `dpp::data_contract::document_type::DocumentTypeRef` --> packages/rs-drive/src/drive/document/paths.rs:5:5 | 5 | use dpp::data_contract::document_type::DocumentTypeRef; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#[cfg(feature = "server")]
use grovedb::batch::key_info::KeyInfo;
#[cfg(feature = "server")]
#[cfg(any(feature = "server", feature = "verify"))]
/// Returns the path to the primary keys of a contract document type.
pub(crate) fn contract_documents_primary_key_path<'a>(

Check warning on line 41 in packages/rs-drive/src/drive/document/paths.rs

GitHub Actions / Rust packages (dash-sdk) / Linting

function `contract_documents_primary_key_path` is never used

warning: function `contract_documents_primary_key_path` is never used --> packages/rs-drive/src/drive/document/paths.rs:41:15 | 41 | pub(crate) fn contract_documents_primary_key_path<'a>( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
contract_id: &'a [u8],
document_type_name: &'a str,
) -> [&'a [u8]; 5] {
query::{Query, QueryItem},
},
dpp::{
identity::identity_public_key::accessors::v0::IdentityPublicKeyGettersV0,

Check warning on line 16 in packages/rs-drive/src/drive/identity/key/fetch/mod.rs

GitHub Actions / Rust packages (dash-sdk) / Linting

unused import: `identity::identity_public_key::accessors::v0::IdentityPublicKeyGettersV0`

warning: unused import: `identity::identity_public_key::accessors::v0::IdentityPublicKeyGettersV0` --> packages/rs-drive/src/drive/identity/key/fetch/mod.rs:16:9 | 16 | identity::identity_public_key::accessors::v0::IdentityPublicKeyGettersV0, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
identity::{KeyID, Purpose},
},
grovedb::{PathQuery, SizedQuery},
#[cfg(feature = "server")]
use crate::drive::contract::DataContractFetchInfo;
use crate::drive::votes::resolved::vote_polls::contested_document_resource_vote_poll::ContestedDocumentResourceVotePollWithContractInfo;

Check warning on line 3 in packages/rs-drive/src/drive/votes/resolved/vote_polls/contested_document_resource_vote_poll/resolve.rs

GitHub Actions / Rust packages (dash-sdk) / Linting

unused import: `crate::drive::votes::resolved::vote_polls::contested_document_resource_vote_poll::ContestedDocumentResourceVotePollWithContractInfo`

warning: unused import: `crate::drive::votes::resolved::vote_polls::contested_document_resource_vote_poll::ContestedDocumentResourceVotePollWithContractInfo` --> packages/rs-drive/src/drive/votes/resolved/vote_polls/contested_document_resource_vote_poll/resolve.rs:3:5 | 3 | use crate::drive::votes::resolved::vote_polls::contested_document_resource_vote_poll::ContestedDocumentResourceVotePollWithContractInfo; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#[cfg(any(feature = "server", feature = "verify"))]
use crate::drive::votes::resolved::vote_polls::contested_document_resource_vote_poll::ContestedDocumentResourceVotePollWithContractInfoAllowBorrowed;
use crate::drive::Drive;

Check warning on line 6 in packages/rs-drive/src/drive/votes/resolved/vote_polls/contested_document_resource_vote_poll/resolve.rs

GitHub Actions / Rust packages (dash-sdk) / Linting

unused import: `crate::drive::Drive`

warning: unused import: `crate::drive::Drive` --> packages/rs-drive/src/drive/votes/resolved/vote_polls/contested_document_resource_vote_poll/resolve.rs:6:5 | 6 | use crate::drive::Drive; | ^^^^^^^^^^^^^^^^^^^
use crate::error::contract::DataContractError;
use crate::error::Error;
#[cfg(feature = "verify")]
}
match self {
DocumentPropertyType::String(_) => {
if value == &vec![0] {

Check warning on line 1203 in packages/rs-dpp/src/data_contract/document_type/property/mod.rs

GitHub Actions / Rust packages (dpp) / Linting

taken reference of right operand

warning: taken reference of right operand --> packages/rs-dpp/src/data_contract/document_type/property/mod.rs:1203:20 | 1203 | if value == &vec![0] { | ^^^^^^^^^-------- | | | help: use the right value directly: `...` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref = note: `#[warn(clippy::op_ref)]` on by default
// we don't want to collide with the definition of an empty string
Ok(Value::Text("".to_string()))
} else {
Ok(identifier.into())
}
DocumentPropertyType::Boolean => {
if value == &vec![0] {

Check warning on line 1294 in packages/rs-dpp/src/data_contract/document_type/property/mod.rs

GitHub Actions / Rust packages (dpp) / Linting

taken reference of right operand

warning: taken reference of right operand --> packages/rs-dpp/src/data_contract/document_type/property/mod.rs:1294:20 | 1294 | if value == &vec![0] { | ^^^^^^^^^-------- | | | help: use the right value directly: `...` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
Ok(Value::Bool(false))
} else if value == &vec![1] {

Check warning on line 1296 in packages/rs-dpp/src/data_contract/document_type/property/mod.rs

GitHub Actions / Rust packages (dpp) / Linting

taken reference of right operand

warning: taken reference of right operand --> packages/rs-dpp/src/data_contract/document_type/property/mod.rs:1296:27 | 1296 | } else if value == &vec![1] { | ^^^^^^^^^-------- | | | help: use the right value directly: `...` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
Ok(Value::Bool(true))
} else {
Err(ProtocolError::DecodingError(
}
}
impl PartialOrd for ContestedIndexFieldMatch {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
use ContestedIndexFieldMatch::*;
match (self, other) {
// Comparing two integers
(PositiveIntegerMatch(a), PositiveIntegerMatch(b)) => a.partial_cmp(b),
// Arbitrarily decide that any Regex is less than any PositiveIntegerMatch
(Regex(_), PositiveIntegerMatch(_)) => Some(Ordering::Less),
(PositiveIntegerMatch(_), Regex(_)) => Some(Ordering::Greater),
// Comparing Regex with Regex, perhaps based on pattern length
(Regex(a), Regex(b)) => a.as_str().len().partial_cmp(&b.as_str().len()),
}
}
}

Check warning on line 172 in packages/rs-dpp/src/data_contract/document_type/index/mod.rs

GitHub Actions / Rust packages (dpp) / Linting

non-canonical implementation of `partial_cmp` on an `Ord` type

warning: non-canonical implementation of `partial_cmp` on an `Ord` type --> packages/rs-dpp/src/data_contract/document_type/index/mod.rs:157:1 | 157 | / impl PartialOrd for ContestedIndexFieldMatch { 158 | | fn partial_cmp(&self, other: &Self) -> Option<Ordering> { | | _____________________________________________________________- 159 | || use ContestedIndexFieldMatch::*; 160 | || match (self, other) { 161 | || // Comparing two integers ... || 170 | || } 171 | || } | ||_____- help: change this to: `{ Some(self.cmp(other)) }` 172 | | } | |__^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default
impl Ord for ContestedIndexFieldMatch {
fn cmp(&self, other: &Self) -> Ordering {
Regex::new(&regex).map_err(|e| {
RegexError(format!(
"invalid field match regex: {}",
e.to_string()

Check warning on line 503 in packages/rs-dpp/src/data_contract/document_type/index/mod.rs

GitHub Actions / Rust packages (dpp) / Linting

`to_string` applied to a type that implements `Display` in `format!` args

warning: `to_string` applied to a type that implements `Display` in `format!` args --> packages/rs-dpp/src/data_contract/document_type/index/mod.rs:503:66 | 503 | ... e.to_string() | ^^^^^^^^^^^^ help: remove this | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args = note: `#[warn(clippy::to_string_in_format_args)]` on by default
))
})?,
));
}).collect::<serde_json::Map<String, serde_json::Value>>();
// Generate indices
let indices_json_schema = indices
.iter()
.map(|(_, index)| {
let properties_schema = index
.properties
.iter()
.map(|prop| {
// Only "asc" is allowed for now (v1.0-dev)
json!({ <std::string::String as Clone>::clone(&prop.name): "asc" })
})
.collect::<Vec<_>>();
json!({
"name": index.name,
"properties": properties_schema,
"unique": index.unique,
})
})

Check warning on line 413 in packages/rs-dpp/src/data_contract/document_type/v0/random_document_type.rs

GitHub Actions / Rust packages (dpp) / Linting

iterating on a map's values

warning: iterating on a map's values --> packages/rs-dpp/src/data_contract/document_type/v0/random_document_type.rs:396:35 | 396 | let indices_json_schema = indices | ___________________________________^ 397 | | .iter() 398 | | .map(|(_, index)| { 399 | | let properties_schema = index ... | 412 | | }) 413 | | }) | |______________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map = note: `#[warn(clippy::iter_kv_map)]` on by default help: try | 396 ~ let indices_json_schema = indices.values().map(|index| { 397 + let properties_schema = index 398 + .properties 399 + .iter() 400 + .map(|prop| { 401 + // Only "asc" is allowed for now (v1.0-dev) 402 + json!({ <std::string::String as Clone>::clone(&prop.name): "asc" }) 403 + }) 404 + .collect::<Vec<_>>(); 405 + 406 + json!({ 407 + "name": index.name, 408 + "properties": properties_schema, 409 + "unique": index.unique, 410 + }) 411 + }) |
.collect::<Vec<_>>();
// Combine everything into the final schema
}
fn has_document_type_for_name(&self, name: &str) -> bool {
self.document_types.get(name).is_some()

Check warning on line 70 in packages/rs-dpp/src/data_contract/v0/accessors/mod.rs

GitHub Actions / Rust packages (dpp) / Linting

unnecessary use of `get(name).is_some()`

warning: unnecessary use of `get(name).is_some()` --> packages/rs-dpp/src/data_contract/v0/accessors/mod.rs:70:29 | 70 | self.document_types.get(name).is_some() | ^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key(name)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default
}
fn document_types_with_contested_indexes(&self) -> BTreeMap<&DocumentName, &DocumentType> {
nonce_counter: &mut BTreeMap<(Identifier, Identifier), u64>, //IdentityID/ContractID -> nonce
) -> Result<DocumentsBatchTransition, ProtocolError> {
let platform_version = PlatformVersion::get(self.protocol_version)?;
let documents: Vec<(
DocumentTransitionActionType,
Vec<(Document, DocumentTypeRef, Bytes32)>,
)> = documents_iter.into_iter().collect();

Check warning on line 218 in packages/rs-dpp/src/document/document_factory/v0/mod.rs

GitHub Actions / Rust packages (dpp) / Linting

very complex type used. Consider factoring parts into `type` definitions

warning: very complex type used. Consider factoring parts into `type` definitions --> packages/rs-dpp/src/document/document_factory/v0/mod.rs:215:24 | 215 | let documents: Vec<( | ________________________^ 216 | | DocumentTransitionActionType, 217 | | Vec<(Document, DocumentTypeRef, Bytes32)>, 218 | | )> = documents_iter.into_iter().collect(); | |__________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity = note: `#[warn(clippy::type_complexity)]` on by default
let mut flattened_documents_iter = documents.iter().flat_map(|(_, v)| v).peekable();
let Some((first_document, _, _)) = flattened_documents_iter.peek() else {
/// * `transaction` - A transaction that requests the contract.
///
/// * `start_at_date` - A `u64` representing the timestamp in Unix Epoch format from which to
/// start fetching the contract's history.

Check warning on line 26 in packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/v0/mod.rs

GitHub Actions / Rust packages (drive) / Linting

doc list item missing indentation

warning: doc list item missing indentation --> packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/v0/mod.rs:26:9 | 26 | /// start fetching the contract's history. | ^ | = help: if this is supposed to be its own paragraph, add a blank line = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation = note: `#[warn(clippy::doc_lazy_continuation)]` on by default help: indent this line | 26 | /// start fetching the contract's history. | ++
///
/// * `limit` - An `Option<u16>` that sets the maximum number of contract history entries
/// to return. If `None`, the limit is set to 10. Should be between 1 and 10.

Check warning on line 29 in packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/v0/mod.rs

GitHub Actions / Rust packages (drive) / Linting

doc list item missing indentation

warning: doc list item missing indentation --> packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/v0/mod.rs:29:9 | 29 | /// to return. If `None`, the limit is set to 10. Should be between 1 and 10. | ^ | = help: if this is supposed to be its own paragraph, add a blank line = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation help: indent this line | 29 | /// to return. If `None`, the limit is set to 10. Should be between 1 and 10. | ++
///
/// * `offset` - An `Option<u16>` that sets the number of contract history entries to skip
/// before starting to return them. If `None`, no entries are skipped.

Check warning on line 32 in packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/v0/mod.rs

GitHub Actions / Rust packages (drive) / Linting

doc list item missing indentation

warning: doc list item missing indentation --> packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/v0/mod.rs:32:9 | 32 | /// before starting to return them. If `None`, no entries are skipped. | ^ | = help: if this is supposed to be its own paragraph, add a blank line = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation help: indent this line | 32 | /// before starting to return them. If `None`, no entries are skipped. | ++
///
/// # Returns
///
/// * `Result<BTreeMap<u64,DataContract>, Error>` - A `Result` type, where `Ok` variant contains
/// a `BTreeMap` with Unix timestamp as the key and contract as the value, representing

Check warning on line 37 in packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/v0/mod.rs

GitHub Actions / Rust packages (drive) / Linting

doc list item missing indentation

warning: doc list item missing indentation --> packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/v0/mod.rs:37:9 | 37 | /// a `BTreeMap` with Unix timestamp as the key and contract as the value, representing | ^ | = help: if this is supposed to be its own paragraph, add a blank line = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation help: indent this line | 37 | /// a `BTreeMap` with Unix timestamp as the key and contract as the value, representing | ++
/// the contract's history. The `Err` variant contains an `Error` in case of a failure.

Check warning on line 38 in packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/v0/mod.rs

GitHub Actions / Rust packages (drive) / Linting

doc list item missing indentation

warning: doc list item missing indentation --> packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/v0/mod.rs:38:9 | 38 | /// the contract's history. The `Err` variant contains an `Error` in case of a failure. | ^ | = help: if this is supposed to be its own paragraph, add a blank line = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation help: indent this line | 38 | /// the contract's history. The `Err` variant contains an `Error` in case of a failure. | ++
///
/// # Errors
///
/// This function will return an `Error` in the following situations:
///
/// * If the contract ID, start date, limit, or offset parameters are invalid for querying
/// contract history.

Check warning on line 45 in packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/v0/mod.rs

GitHub Actions / Rust packages (drive) / Linting

doc list item missing indentation

warning: doc list item missing indentation --> packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/v0/mod.rs:45:9 | 45 | /// contract history. | ^ | = help: if this is supposed to be its own paragraph, add a blank line = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation help: indent this line | 45 | /// contract history. | ++
///
/// * If the contract cannot be deserialized due to protocol errors.
///
/// * `transaction` - A transaction that requests the contract.
///
/// * `start_at_date` - A `u64` representing the timestamp in Unix Epoch format from which to
/// start fetching the contract's history.

Check warning on line 22 in packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/mod.rs

GitHub Actions / Rust packages (drive) / Linting

doc list item missing indentation

warning: doc list item missing indentation --> packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/mod.rs:22:9 | 22 | /// start fetching the contract's history. | ^ | = help: if this is supposed to be its own paragraph, add a blank line = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation help: indent this line | 22 | /// start fetching the contract's history. | ++
///
/// * `limit` - An `Option<u16>` that sets the maximum number of contract history entries
/// to return. If `None`, the limit is set to 10. Should be between 1 and 10.

Check warning on line 25 in packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/mod.rs

GitHub Actions / Rust packages (drive) / Linting

doc list item missing indentation

warning: doc list item missing indentation --> packages/rs-drive/src/drive/contract/get_fetch/fetch_contract_with_history/mod.rs:25:9 | 25 | /// to return. If `None`, the limit is set to 10. Should be between 1 and 10. | ^ | = help: if this is supposed to be its own paragraph, add a blank line = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation help: indent this line | 25 | /// to return. If `None`, the limit is set to 10. Should be between 1 and 10. | ++
///
/// * `offset` - An `Option<u16>` that sets the number of contract history entries to skip
/// before starting to return them. If `None`, no entries are skipped.
let new_payout_address =
if let Some(operator_payout_address) = operator_payout_address_change {
operator_payout_address
} else {
if let Some((_, found_old_key)) = identity_to_enable_old_keys
.iter()
.find(|(_, key)| key.purpose() == Purpose::TRANSFER)
{
Some(found_old_key.data().to_vec().try_into().map_err(|_| {
Error::Execution(ExecutionError::CorruptedDriveResponse(
"old payout address should be 20 bytes".to_string(),
))
})?)
} else {
// finally we just use the old masternode payout address
// we need to use the old pub_key_operator
old_masternode.state.operator_payout_address
}
};

Check warning on line 283 in packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs

GitHub Actions / Rust packages (drive-abci) / Linting

this `else { if .. }` block can be collapsed

warning: this `else { if .. }` block can be collapsed --> packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs:268:24 | 268 | } else { | ________________________^ 269 | | if let Some((_, found_old_key)) = identity_to_enable_old_keys 270 | | .iter() 271 | | .find(|(_, key)| key.purpose() == Purpose::TRANSFER) ... | 282 | | } 283 | | }; | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if = note: `#[warn(clippy::collapsible_else_if)]` on by default help: collapse nested if block | 268 ~ } else if let Some((_, found_old_key)) = identity_to_enable_old_keys 269 + .iter() 270 + .find(|(_, key)| key.purpose() == Purpose::TRANSFER) 271 + { 272 + Some(found_old_key.data().to_vec().try_into().map_err(|_| { 273 + Error::Execution(ExecutionError::CorruptedDriveResponse( 274 + "old payout address should be 20 bytes".to_string(), 275 + )) 276 + })?) 277 + } else { 278 + // finally we just use the old masternode payout address 279 + // we need to use the old pub_key_operator 280 + old_masternode.state.operator_payout_address 281 ~ }; |
let new_platform_node_id = if let Some(platform_node_id) = platform_node_id_change {
// if it changed it means it always existed
if let Some(new_payout_address) = new_payout_address {
if let Some((key_id, found_old_key)) = identity_to_enable_old_keys
.iter()
.find(|(_, key)| key.data().as_slice() == &new_payout_address)

Check warning on line 323 in packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs

GitHub Actions / Rust packages (drive-abci) / Linting

taken reference of right operand

warning: taken reference of right operand --> packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs:323:42 | 323 | .find(|(_, key)| key.data().as_slice() == &new_payout_address) | ^^^^^^^^^^^^^^^^^^^^^^^^^------------------- | | | help: use the right value directly: `new_payout_address` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref = note: `#[warn(clippy::op_ref)]` on by default
{
if found_old_key.is_disabled() {
key_ids_to_reenable.push(*key_id)
if let Some(new_platform_node_id) = new_platform_node_id {
if let Some((key_id, found_old_key)) = identity_to_enable_old_keys
.into_iter()
.find(|(_, key)| key.data().as_slice() == &new_platform_node_id)

Check warning on line 347 in packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs

GitHub Actions / Rust packages (drive-abci) / Linting

taken reference of right operand

warning: taken reference of right operand --> packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs:347:42 | 347 | .find(|(_, key)| key.data().as_slice() == &new_platform_node_id) | ^^^^^^^^^^^^^^^^^^^^^^^^^--------------------- | | | help: use the right value directly: `new_platform_node_id` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
{
if found_old_key.is_disabled() {
key_ids_to_reenable.push(key_id)
Function: FnOnce() -> Output + Send + 'static,
Output: Send + 'static,
{
#[cfg(all(tokio_unstable, feature = "console"))]

Check warning on line 13 in packages/rs-drive-abci/src/utils/spawn.rs

GitHub Actions / Rust packages (drive-abci) / Linting

unexpected `cfg` condition name: `tokio_unstable`

warning: unexpected `cfg` condition name: `tokio_unstable` --> packages/rs-drive-abci/src/utils/spawn.rs:13:15 | 13 | #[cfg(all(tokio_unstable, feature = "console"))] | ^^^^^^^^^^^^^^ | = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, and `windows` = help: consider using a Cargo feature instead = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] } = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(tokio_unstable)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default
{
tokio::task::Builder::new()
.name(_sometimes_used_name)
.spawn_blocking(function)
}
#[cfg(not(all(tokio_unstable, feature = "console")))]

Check warning on line 20 in packages/rs-drive-abci/src/utils/spawn.rs

GitHub Actions / Rust packages (drive-abci) / Linting

unexpected `cfg` condition name: `tokio_unstable`

warning: unexpected `cfg` condition name: `tokio_unstable` --> packages/rs-drive-abci/src/utils/spawn.rs:20:19 | 20 | #[cfg(not(all(tokio_unstable, feature = "console")))] | ^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] } = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(tokio_unstable)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
{
Ok(tokio::task::spawn_blocking(function))
}
pub trait OperationLike {
fn processing_cost(&self, platform_version: &PlatformVersion) -> Result<Credits, Error>;
fn storage_cost(&self, platform_version: &PlatformVersion) -> Result<Credits, Error>;

Check warning on line 81 in packages/rs-drive-abci/src/execution/types/execution_operation/mod.rs

GitHub Actions / Rust packages (drive-abci) / Linting

method `storage_cost` is never used

warning: method `storage_cost` is never used --> packages/rs-drive-abci/src/execution/types/execution_operation/mod.rs:81:8 | 78 | pub trait OperationLike { | ------------- method in this trait ... 81 | fn storage_cost(&self, platform_version: &PlatformVersion) -> Result<Credits, Error>; | ^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
}
impl ValidationOperation {
pub check_tx_rpc: CheckTxCoreRpcConfig,
}
impl Default for CoreConfig {
fn default() -> Self {
Self {
consensus_rpc: Default::default(),
check_tx_rpc: Default::default(),
}
}
}

Check warning on line 93 in packages/rs-drive-abci/src/config.rs

GitHub Actions / Rust packages (drive-abci) / Linting

this `impl` can be derived

warning: this `impl` can be derived --> packages/rs-drive-abci/src/config.rs:86:1 | 86 | / impl Default for CoreConfig { 87 | | fn default() -> Self { 88 | | Self { 89 | | consensus_rpc: Default::default(), ... | 92 | | } 93 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = note: `#[warn(clippy::derivable_impls)]` on by default = help: remove the manual implementation... help: ...and instead derive it | 77 + #[derive(Default)] 78 | pub struct CoreConfig { |
/// Configuration of the execution part of Dash Platform.
#[derive(Clone, Debug, Serialize, Deserialize)]
pub instant_lock: InstantLockConfig,
pub block_spacing_ms: u64,
#[serde(default = "PlatformConfig::default_initial_protocol_version")]
pub initial_protocol_version: ProtocolVersion,

Check warning on line 237 in packages/rs-drive-abci/src/config.rs

GitHub Actions / Rust packages (drive-abci) / Linting

field `initial_protocol_version` is never read

warning: field `initial_protocol_version` is never read --> packages/rs-drive-abci/src/config.rs:237:9 | 210 | struct PlatformConfigIntermediate { | -------------------------- field in this struct ... 237 | pub initial_protocol_version: ProtocolVersion, | ^^^^^^^^^^^^^^^^^^^^^^^^
pub db_path: PathBuf,
#[serde(default)]
pub rejections_path: Option<PathBuf>,
fn with_serde_to_platform_value(&self) -> Result<Value, JsValue>;
/// Converts the `JsValue` into `platform::Value`. It's an expensive conversion,
/// as `JsValue` must be stringified first
fn with_serde_to_platform_value_map(&self) -> Result<BTreeMap<String, Value>, JsValue>;

Check warning on line 24 in packages/wasm-dpp/src/utils.rs

GitHub Actions / Rust packages (wasm-dpp) / Linting

methods `with_serde_to_platform_value_map` and `with_serde_into` are never used

warning: methods `with_serde_to_platform_value_map` and `with_serde_into` are never used --> packages/wasm-dpp/src/utils.rs:24:8 | 19 | pub trait ToSerdeJSONExt { | -------------- methods in this trait ... 24 | fn with_serde_to_platform_value_map(&self) -> Result<BTreeMap<String, Value>, JsValue>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 25 | fn with_serde_into<D: DeserializeOwned>(&self) -> Result<D, JsValue> | ^^^^^^^^^^^^^^^
fn with_serde_into<D: DeserializeOwned>(&self) -> Result<D, JsValue>

Check warning on line 25 in packages/wasm-dpp/src/utils.rs

GitHub Actions / Rust packages (wasm-dpp) / Linting

bound is defined in more than one place

warning: bound is defined in more than one place --> packages/wasm-dpp/src/utils.rs:25:24 | 25 | fn with_serde_into<D: DeserializeOwned>(&self) -> Result<D, JsValue> | ^ 26 | where 27 | D: for<'de> serde::de::Deserialize<'de> + 'static; | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations = note: `#[warn(clippy::multiple_bound_locations)]` on by default
where
D: for<'de> serde::de::Deserialize<'de> + 'static;
}
pub(crate) trait Inner {
type InnerItem;
fn into_inner(self) -> Self::InnerItem;

Check warning on line 287 in packages/wasm-dpp/src/utils.rs

GitHub Actions / Rust packages (wasm-dpp) / Linting

methods `into_inner` and `inner_mut` are never used

warning: methods `into_inner` and `inner_mut` are never used --> packages/wasm-dpp/src/utils.rs:287:8 | 284 | pub(crate) trait Inner { | ----- methods in this trait ... 287 | fn into_inner(self) -> Self::InnerItem; | ^^^^^^^^^^ 288 | fn inner(&self) -> &Self::InnerItem; 289 | fn inner_mut(&mut self) -> &mut Self::InnerItem; | ^^^^^^^^^
fn inner(&self) -> &Self::InnerItem;
fn inner_mut(&mut self) -> &mut Self::InnerItem;
}
}
#[wasm_bindgen(js_name=NonConsensusErrorWasm)]
pub struct NonConsensusErrorWasm(NonConsensusError);

Check warning on line 274 in packages/wasm-dpp/src/identity/identity_facade.rs

GitHub Actions / Rust packages (wasm-dpp) / Linting

field `0` is never read

warning: field `0` is never read --> packages/wasm-dpp/src/identity/identity_facade.rs:274:34 | 274 | pub struct NonConsensusErrorWasm(NonConsensusError); | --------------------- ^^^^^^^^^^^^^^^^^ | | | field in this struct | = note: `#[warn(dead_code)]` on by default help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field | 274 | pub struct NonConsensusErrorWasm(()); | ~~
impl From<NonConsensusError> for NonConsensusErrorWasm {
fn from(err: NonConsensusError) -> Self {
}
}
pub trait AssetLockProofLike {

Check warning on line 49 in packages/wasm-dpp/src/identity/state_transition/asset_lock_proof/mod.rs

GitHub Actions / Rust packages (wasm-dpp) / Linting

trait `AssetLockProofLike` is never used

warning: trait `AssetLockProofLike` is never used --> packages/wasm-dpp/src/identity/state_transition/asset_lock_proof/mod.rs:49:11 | 49 | pub trait AssetLockProofLike { | ^^^^^^^^^^^^^^^^^^
fn to_object(&self) -> Result<JsValue, JsValue>;
}
#[derive(Default)]
pub struct ToObject {
pub transition_type: u8,
pub identity_id: Identifier,

Check warning on line 21 in packages/wasm-dpp/src/identity/state_transition/identity_create_transition/to_object.rs

GitHub Actions / Rust packages (wasm-dpp) / Linting

field `identity_id` is never read

warning: field `identity_id` is never read --> packages/wasm-dpp/src/identity/state_transition/identity_create_transition/to_object.rs:21:9 | 19 | pub struct ToObject { | -------- field in this struct 20 | pub transition_type: u8, 21 | pub identity_id: Identifier, | ^^^^^^^^^^^
pub asset_lock_proof: AssetLockProof,
pub public_keys: Vec<IdentityPublicKeyInCreation>,
pub signature: Option<Vec<u8>>,
pub struct ToObject {
pub transition_type: u8,
pub pro_tx_hash: Identifier,
pub vote: Vote,

Check warning on line 21 in packages/wasm-dpp/src/voting/state_transition/masternode_vote_transition/to_object.rs

GitHub Actions / Rust packages (wasm-dpp) / Linting

field `vote` is never read

warning: field `vote` is never read --> packages/wasm-dpp/src/voting/state_transition/masternode_vote_transition/to_object.rs:21:9 | 18 | pub struct ToObject { | -------- field in this struct ... 21 | pub vote: Vote, | ^^^^
pub signature: Option<Vec<u8>>,
pub signature_public_key_id: Option<KeyID>,
}
mod data_contract_factory;

Check warning on line 1 in packages/wasm-dpp/src/data_contract_factory/mod.rs

GitHub Actions / Rust packages (wasm-dpp) / Linting

module has the same name as its containing module

warning: module has the same name as its containing module --> packages/wasm-dpp/src/data_contract_factory/mod.rs:1:1 | 1 | mod data_contract_factory; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception = note: `#[warn(clippy::module_inception)]` on by default
/**
* @typedef {BlockHeadersProviderOptions} BlockHeadersProviderOptions
* @property {string} [network=testnet]

Check warning on line 8 in packages/js-dapi-client/lib/BlockHeadersProvider/BlockHeadersProvider.js

GitHub Actions / JS packages (@dashevo/dapi-client) / Linting

Missing JSDoc @Property "network" description
* @property {number} [maxParallelStreams=5] max parallel streams to read historical block headers
* @property {number} [targetBatchSize=100000] a target batch size per stream
* @property {number} [maxRetries=10] max amount of retries per stream connection
class BlockHeadersProvider extends EventEmitter {
/**
* @param {BlockHeadersProviderOptions} options

Check warning on line 38 in packages/js-dapi-client/lib/BlockHeadersProvider/BlockHeadersProvider.js

GitHub Actions / JS packages (@dashevo/dapi-client) / Linting

Missing JSDoc @param "options" description
* @param {Function} [createHistoricalSyncStream]

Check warning on line 39 in packages/js-dapi-client/lib/BlockHeadersProvider/BlockHeadersProvider.js

GitHub Actions / JS packages (@dashevo/dapi-client) / Linting

Missing JSDoc @param "createHistoricalSyncStream" description
* @param {Function} [createContinuousSyncStream]

Check warning on line 40 in packages/js-dapi-client/lib/BlockHeadersProvider/BlockHeadersProvider.js

GitHub Actions / JS packages (@dashevo/dapi-client) / Linting

Missing JSDoc @param "createContinuousSyncStream" description
*/
// TODO move options to as last param
// eslint-disable-next-line default-param-last
}
/**
* @param {BlockHeadersReader} blockHeadersReader

Check warning on line 63 in packages/js-dapi-client/lib/BlockHeadersProvider/BlockHeadersProvider.js

GitHub Actions / JS packages (@dashevo/dapi-client) / Linting

Missing JSDoc @param "blockHeadersReader" description
*/
setBlockHeadersReader(blockHeadersReader) {
this.blockHeadersReader = blockHeadersReader;
/**
*
* @param {SpvChain} spvChain

Check warning on line 71 in packages/js-dapi-client/lib/BlockHeadersProvider/BlockHeadersProvider.js

GitHub Actions / JS packages (@dashevo/dapi-client) / Linting

Missing JSDoc @param "spvChain" description
*/
setSpvChain(spvChain) {
this.spvChain = spvChain;
/**
* Initializes SPV chain with a list of headers and a known lastSyncedHeaderHeight
* @param headers

Check warning on line 107 in packages/js-dapi-client/lib/BlockHeadersProvider/BlockHeadersProvider.js

GitHub Actions / JS packages (@dashevo/dapi-client) / Linting

Missing JSDoc @param "headers" description

Check warning on line 107 in packages/js-dapi-client/lib/BlockHeadersProvider/BlockHeadersProvider.js

GitHub Actions / JS packages (@dashevo/dapi-client) / Linting

Missing JSDoc @param "headers" type
* @param firstHeaderHeight

Check warning on line 108 in packages/js-dapi-client/lib/BlockHeadersProvider/BlockHeadersProvider.js

GitHub Actions / JS packages (@dashevo/dapi-client) / Linting

Missing JSDoc @param "firstHeaderHeight" description

Check warning on line 108 in packages/js-dapi-client/lib/BlockHeadersProvider/BlockHeadersProvider.js

GitHub Actions / JS packages (@dashevo/dapi-client) / Linting

Missing JSDoc @param "firstHeaderHeight" type
*/
async initializeChainWith(headers, firstHeaderHeight) {
await SpvChain.wasmX11Ready();
const DEFAULT_ADDRESSES = ['yfLBwbdPKpKd7bSZ9ABrzTiknu67nDMqTJ', 'yYcL6ezfPgUWNV8fEp2gkw69ArDn76vus2', 'yfLBwbdPKpKd7bSZ9ABrzTiknu67nDMqTJ'];
beforeEach(function () {

Check warning on line 24 in packages/wallet-lib/src/plugins/Workers/TransactionsSyncWorker/TransactionsReader.spec.js

GitHub Actions / JS packages (@dashevo/wallet-lib) / Linting

Unexpected unnamed function
options = {
network: NETWORK,
maxRetries: 3,
.to.have.not.been.calledWith('error');
});
it('should throw an error if invalid Merkle Block height provided', async function () {

Check warning on line 766 in packages/wallet-lib/src/plugins/Workers/TransactionsSyncWorker/TransactionsReader.spec.js

GitHub Actions / JS packages (@dashevo/wallet-lib) / Linting

Unexpected unnamed async function
await transactionsReader.startContinuousSync(fromBlockHeight, DEFAULT_ADDRESSES);
continuousSyncStream.retryOnError = this.sinon.stub()
merkleBlock = mockMerkleBlock([]);
});
it('should emit error if Merkle Block rejected', async function () {

Check warning on line 801 in packages/wallet-lib/src/plugins/Workers/TransactionsSyncWorker/TransactionsReader.spec.js

GitHub Actions / JS packages (@dashevo/wallet-lib) / Linting

Unexpected unnamed async function
await transactionsReader.startContinuousSync(fromBlockHeight, DEFAULT_ADDRESSES);
continuousSyncStream.retryOnError = this.sinon.stub()
chainStore = storage.getDefaultChainStore();
});
it('should not process same merkle block two times', function () {

Check warning on line 881 in packages/wallet-lib/src/plugins/Workers/TransactionsSyncWorker/TransactionsSyncWorker.spec.js

GitHub Actions / JS packages (@dashevo/wallet-lib) / Linting

Unexpected unnamed function
const merkleBlock = mockMerkleBlock([]);
const merkleBlockHeight = 500;
});
};
initX11().catch(console.error);

Check warning on line 33 in packages/wallet-lib/src/test/mocks/dashcore/block.js

GitHub Actions / JS packages (@dashevo/wallet-lib) / Linting

Unexpected console statement
/**
* Mock block header
try {
result = dpp.identity.createFromBuffer(identity.toBuffer());
} catch (e) {
console.dir(e.getErrors()[0].toString());

Check warning on line 69 in packages/wasm-dpp/test/integration/identity/IdentityFacade.spec.js

GitHub Actions / JS packages (@dashevo/wasm-dpp) / Linting

Unexpected console statement
}
expect(result).to.be.an.instanceOf(Identity);
expect(error.getId()).to.equal(3);
});
it('should pass when disabling public key', async function () {

Check warning on line 127 in packages/wasm-dpp/test/integration/identity/stateTransition/IdentityUpdateTransition/validation/state/validateIdentityUpdateTransitionStateFactory.spec.js

GitHub Actions / JS packages (@dashevo/wasm-dpp) / Linting

Unexpected unnamed async function
stateTransition.setPublicKeyIdsToDisable([1]);
stateTransition.setPublicKeysToAdd(undefined);
.to.be.calledOnce();
});
it('should pass when adding public key', async function () {

Check warning on line 146 in packages/wasm-dpp/test/integration/identity/stateTransition/IdentityUpdateTransition/validation/state/validateIdentityUpdateTransitionStateFactory.spec.js

GitHub Actions / JS packages (@dashevo/wasm-dpp) / Linting

Unexpected unnamed async function
stateTransition.setPublicKeyIdsToDisable(undefined);
const result = await validateIdentityUpdateTransitionState(stateTransition);
.to.not.be.called();
});
it('should pass when both adding and disabling public keys', async function () {

Check warning on line 164 in packages/wasm-dpp/test/integration/identity/stateTransition/IdentityUpdateTransition/validation/state/validateIdentityUpdateTransitionStateFactory.spec.js

GitHub Actions / JS packages (@dashevo/wasm-dpp) / Linting

Unexpected unnamed async function
stateTransition.setPublicKeyIdsToDisable([1]);
const result = await validateIdentityUpdateTransitionState(stateTransition);
// );
});
it('should return valid result on dry run', async function () {

Check warning on line 230 in packages/wasm-dpp/test/integration/identity/stateTransition/IdentityUpdateTransition/validation/state/validateIdentityUpdateTransitionStateFactory.spec.js

GitHub Actions / JS packages (@dashevo/wasm-dpp) / Linting

Unexpected unnamed async function
stateTransition.setPublicKeyIdsToDisable([3]);
// Make code that executes after dry run check to fail
expect(stateRepositoryMock.fetchLatestPlatformCoreChainLockedHeight).to.not.be.called();
});
it('should point to existing transaction', async function () {

Check warning on line 310 in packages/wasm-dpp/test/integration/identity/stateTransition/assetLockProof/chain/validateChainAssetLockProofStructureFactory.spec.js

GitHub Actions / JS packages (@dashevo/wasm-dpp) / Linting

Unexpected unnamed async function
stateRepositoryMock.fetchTransaction.resolves(null);
const result = await validateChainAssetLockProofStructure(
);
});
it('should point to transaction from block lower than core chain locked height', async function () {

Check warning on line 356 in packages/wasm-dpp/test/integration/identity/stateTransition/assetLockProof/chain/validateChainAssetLockProofStructureFactory.spec.js

GitHub Actions / JS packages (@dashevo/wasm-dpp) / Linting

Unexpected unnamed async function
rawProof.coreChainLockedHeight = 41;
stateRepositoryMock.fetchLatestPlatformCoreChainLockedHeight.resolves(41);
});
});
it('should return valid result', async function () {

Check warning on line 381 in packages/wasm-dpp/test/integration/identity/stateTransition/assetLockProof/chain/validateChainAssetLockProofStructureFactory.spec.js

GitHub Actions / JS packages (@dashevo/wasm-dpp) / Linting

Unexpected unnamed async function
const result = await validateChainAssetLockProofStructure(
rawProof,
executionContext,
([output] = transaction.outputs);
});
it('should fetch output from state repository', async function () {

Check warning on line 92 in packages/wasm-dpp/test/integration/identity/stateTransition/assetLockProof/fetchAssetLockTransactionOutputFactory.spec.js

GitHub Actions / JS packages (@dashevo/wasm-dpp) / Linting

Unexpected unnamed async function
const assetLockTransactionOutput = await fetchAssetLockTransactionOutput(
assetLockProofFixture,
executionContext,
import { contractId as dashpayContractId } from '@dashevo/dashpay-contract/lib/systemIds';
import { contractId as masternodeRewardSharesContractId } from '@dashevo/masternode-reward-shares-contract/lib/systemIds';
import { contractId as withdrawalsContractId } from '@dashevo/withdrawals-contract/lib/systemIds';
import { Platform } from './Platform';

Check warning on line 10 in packages/js-dash-sdk/src/SDK/Client/Client.ts

GitHub Actions / JS packages (dash) / Linting

Dependency cycle via ./Platform:1
import { ClientApps, ClientAppsOptions } from './ClientApps';
export interface WalletOptions extends Wallet.IWalletOptions {
throw new Error('Wallet is not initialized, pass `wallet` option to Client');
}
options = {

Check warning on line 166 in packages/js-dash-sdk/src/SDK/Client/Client.ts

GitHub Actions / JS packages (dash) / Linting

Assignment to function parameter 'options'
index: this.defaultAccountIndex,
synchronize: true,
...options,
offset: number,
): Promise<GetDataContractHistoryResponse> {
// Define query
const query = async (): Promise<GetDataContractHistoryResponse> => await this

Check warning on line 143 in packages/js-dash-sdk/src/SDK/Client/Platform/Fetcher/Fetcher.ts

GitHub Actions / JS packages (dash) / Linting

Returning an awaited value that is not a promise is not allowed
.dapiClient.platform.getDataContractHistory(id, startAMs, limit, offset);
// Define retry attempts.
// import { getLatestProtocolVersion } from '@dashevo/wasm-dpp';
import { Platform } from './index';
import 'mocha';
import Client from '../Client';

Check warning on line 5 in packages/js-dash-sdk/src/SDK/Client/Platform/Platform.spec.ts

GitHub Actions / JS packages (dash) / Linting

Using exported name 'Client' as identifier for default export
describe('Dash - Platform', () => {
it('should provide expected class', () => {
import type { DPPModule } from '@dashevo/wasm-dpp';
import crypto from 'crypto';
import Client from '../Client';

Check warning on line 5 in packages/js-dash-sdk/src/SDK/Client/Platform/Platform.ts

GitHub Actions / JS packages (dash) / Linting

Dependency cycle via ./Platform:10

Check warning on line 5 in packages/js-dash-sdk/src/SDK/Client/Platform/Platform.ts

GitHub Actions / JS packages (dash) / Linting

Using exported name 'Client' as identifier for default export
import { IStateTransitionResult } from './IStateTransitionResult';
import createAssetLockTransaction from './createAssetLockTransaction';

Check warning on line 8 in packages/js-dash-sdk/src/SDK/Client/Platform/Platform.ts

GitHub Actions / JS packages (dash) / Linting

Dependency cycle detected

Check warning on line 8 in packages/js-dash-sdk/src/SDK/Client/Platform/Platform.ts

GitHub Actions / JS packages (dash) / Linting

Using exported name 'createAssetLockTransaction' as identifier for default export
import broadcastDocument from './methods/documents/broadcast';

Check warning on line 10 in packages/js-dash-sdk/src/SDK/Client/Platform/Platform.ts

GitHub Actions / JS packages (dash) / Linting

Dependency cycle detected
import createDocument from './methods/documents/create';

Check warning on line 11 in packages/js-dash-sdk/src/SDK/Client/Platform/Platform.ts

GitHub Actions / JS packages (dash) / Linting

Dependency cycle detected
import getDocument from './methods/documents/get';
import publishContract from './methods/contracts/publish';