Skip to content

Commit cbe12c1

Browse files
fix: fix bincode import and pass None to apply diff when validation is false (#70)
* small fixes * fmt
1 parent 05ca90e commit cbe12c1

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ members = ["dash", "hashes", "internals", "fuzz", "rpc-client", "rpc-json", "rpc
33
resolver = "2"
44

55
[workspace.package]
6-
version = "0.39.2"
6+
version = "0.39.3"
77

88
[patch.crates-io.dashcore_hashes]
99
path = "hashes"

dash/src/pow.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//! functions here are designed to be fast, by that we mean it is safe to use them to check headers.
88
//!
99
10+
#[cfg(feature = "bincode")]
1011
use bincode::{Decode, Encode};
1112
use core::fmt::{self, LowerHex, UpperHex};
1213
use core::ops::{Add, Div, Mul, Not, Rem, Shl, Shr, Sub};
@@ -320,7 +321,8 @@ impl Decodable for CompactTarget {
320321

321322
/// Big-endian 256 bit integer type.
322323
// (high, low): u.0 contains the high bits, u.1 contains the low bits.
323-
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default, Encode, Decode)]
324+
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
325+
#[cfg_attr(feature = "bincode", derive(Encode, Decode))]
324326
struct U256(u128, u128);
325327

326328
impl U256 {

dash/src/sml/masternode_list_engine/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -811,8 +811,11 @@ impl MasternodeListEngine {
811811

812812
#[cfg(not(feature = "quorum_validation"))]
813813
let rotation_sig = {
814-
let (masternode_list, rotation_sig) =
815-
base_masternode_list.apply_diff(masternode_list_diff.clone(), diff_end_height)?;
814+
let (masternode_list, rotation_sig) = base_masternode_list.apply_diff(
815+
masternode_list_diff.clone(),
816+
diff_end_height,
817+
None,
818+
)?;
816819
if verify_quorums {
817820
return Err(SmlError::FeatureNotTurnedOn(
818821
"quorum validation feature is not turned on".to_string(),

0 commit comments

Comments
 (0)