Skip to content
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

chore: small import fixes and version bump #57

Merged
merged 1 commit into from
Feb 27, 2025
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 dash/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dashcore"
version = "0.36.0"
version = "0.36.1"
authors = [
"Samuel Westrich <sam@dash.org>",
"Anton Suprunchuk <anton@dash.org>",
Expand Down
1 change: 0 additions & 1 deletion dash/src/blockdata/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,6 @@ mod tests {
use crate::consensus::encode::{deserialize, serialize};
use crate::internal_macros::hex;
use crate::network::message::{NetworkMessage, RawNetworkMessage};
use crate::network::message_sml::MnListDiff;

#[test]
fn test_is_coinbase() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ mod tests {
use crate::transaction::special_transaction::provider_registration::{
ProviderMasternodeType, ProviderRegistrationPayload,
};
use crate::{OutPoint, PubkeyHash, ScriptBuf, Transaction, Txid};
use crate::{OutPoint, PubkeyHash, ScriptBuf, Txid};

#[cfg(feature = "signer")]
mod signer {
Expand Down
3 changes: 0 additions & 3 deletions dash/src/network/message_sml.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
use std::io;

#[cfg(feature = "bincode")]
use bincode::{Decode, Encode};

use crate::bls_sig_utils::BLSSignature;
use crate::consensus::{Decodable, Encodable, encode};
use crate::hash_types::MerkleRootMasternodeList;
use crate::internal_macros::impl_consensus_encoding;
use crate::sml::llmq_type::LLMQType;
Expand Down
7 changes: 2 additions & 5 deletions dash/src/sml/masternode_list_engine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl MasternodeListEngine {
let block_hash = masternode_list_diff.block_hash;
let base_block_hash = masternode_list_diff.base_block_hash;
let masternode_list = masternode_list_diff
.try_into_with_block_hash_lookup(|block_hash| Some(block_height), network)?;
.try_into_with_block_hash_lookup(|_block_hash| Some(block_height), network)?;
Ok(Self {
block_hashes: [(0, base_block_hash), (block_height, block_hash)].into(),
block_heights: [(base_block_hash, 0), (block_hash, block_height)].into(),
Expand Down Expand Up @@ -812,9 +812,6 @@ impl MasternodeListEngine {

#[cfg(test)]
mod tests {

use bincode::Decode;

use crate::sml::llmq_entry_verification::LLMQEntryVerificationStatus;
use crate::sml::llmq_type::LLMQType;
use crate::sml::llmq_type::LLMQType::{Llmqtype50_60, Llmqtype400_60, Llmqtype400_85};
Expand Down Expand Up @@ -948,7 +945,7 @@ mod tests {
.expect("expected to decode")
.0;

for (cycle_hash, quorums) in mn_list_engine.rotated_quorums_per_cycle.iter() {
for quorums in mn_list_engine.rotated_quorums_per_cycle.values() {
mn_list_engine
.validate_rotation_cycle_quorums(quorums.iter().collect::<Vec<_>>().as_slice())
.expect("expected to validated quorums");
Expand Down
1 change: 1 addition & 0 deletions dash/src/sml/message_verification_error.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[cfg(feature = "bincode")]
use bincode::{Decode, Encode};
use hashes::sha256d;
use thiserror::Error;
Expand Down
1 change: 0 additions & 1 deletion dash/src/sml/quorum_entry/qualified_quorum_entry.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#[cfg(feature = "bincode")]
use bincode::{Decode, Encode};
use hashes::Hash;

use crate::hash_types::{QuorumCommitmentHash, QuorumEntryHash};
use crate::sml::llmq_entry_verification::{
Expand Down
2 changes: 1 addition & 1 deletion dash/src/sml/quorum_entry/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl QualifiedQuorumEntry {
where
I: IntoIterator<Item = &'a MasternodeListEntry>,
{
let mut message = self.commitment_hash.to_byte_array();
let message = self.commitment_hash.to_byte_array();
let message = message.as_slice();
let public_keys2 = operator_keys
.into_iter()
Expand Down
2 changes: 1 addition & 1 deletion hashes/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dashcore_hashes"
version = "0.15.0"
version = "0.15.1"
authors = ["Samuel Westrich <sam@dash.org>"]
license = "CC0-1.0"
repository = "https://github.com/rust-dashcore/dash_hashes/"
Expand Down
Loading