Skip to content

Commit 51df58f

Browse files
authored
fix: genesis block hash order for testnet (#73)
* fix: testnet genesis reversed + quorum snapshot field is actually Vec<i32> * chore: bump up version to 0.39.6
1 parent 8a87e75 commit 51df58f

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
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.4"
6+
version = "0.39.6"
77

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

dash/src/consensus/encode.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,7 @@ impl_vec!(TxIn);
738738
impl_vec!(Vec<u8>);
739739
impl_vec!(u16);
740740
impl_vec!(u32);
741+
impl_vec!(i32);
741742
impl_vec!(u64);
742743
impl_vec!(TapLeafHash);
743744
impl_vec!(VarInt);

dash/src/network/constants.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,7 @@ impl Network {
163163
hex::decode("00000bafbc94add76cb75e2ec92894837288a481e5c005f6563d91623bf8bc2c")
164164
.expect("expected valid hex");
165165
block_hash.reverse();
166-
Some(BlockHash::from_byte_array(
167-
hex::decode("00000bafbc94add76cb75e2ec92894837288a481e5c005f6563d91623bf8bc2c")
168-
.expect("expected valid hex")
169-
.try_into()
170-
.expect("expected 32 bytes"),
171-
))
166+
Some(BlockHash::from_byte_array(block_hash.try_into().expect("expected 32 bytes")))
172167
}
173168
Network::Devnet => None,
174169
Network::Regtest => None,

dash/src/network/message_qrinfo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ impl Decodable for QRInfo {
157157
pub struct QuorumSnapshot {
158158
pub skip_list_mode: MNSkipListMode,
159159
pub active_quorum_members: Vec<bool>, // Bitset, length = (active_quorum_members_count + 7) / 8
160-
pub skip_list: Vec<u32>, // Array of uint32_t
160+
pub skip_list: Vec<i32>, // Array of uint32_t
161161
}
162162

163163
impl Display for QuorumSnapshot {

0 commit comments

Comments
 (0)