Skip to content

Commit 7dc6a7c

Browse files
more work
1 parent c7f2c30 commit 7dc6a7c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

dash/src/sml/masternode_list_engine/rotated_quorum_construction.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::collections::BTreeSet;
22
use crate::hash_types::QuorumModifierHash;
3-
use crate::network::message_qrinfo::MNSkipListMode;
3+
use crate::network::message_qrinfo::{MNSkipListMode, QRInfo};
44
use crate::prelude::CoreBlockHeight;
55
use crate::sml::llmq_type::LLMQParams;
66
use crate::sml::llmq_type::rotation::{LLMQQuarterReconstructionType, LLMQQuarterUsageType};
@@ -34,13 +34,13 @@ impl MasternodeListEngine {
3434
Ok(rotated_members)
3535
}
3636

37-
pub fn required_cl_sig_heights(&self) -> Result<BTreeSet<u32>, QuorumValidationError> {
37+
pub fn required_cl_sig_heights(&self, qrinfo: &QRInfo) -> Result<BTreeSet<u32>, QuorumValidationError> {
3838
let mut required_heights = BTreeSet::new();
39-
for quorum in &self.last_commitment_entries {
40-
let Some(quorum_block_height) = self.block_heights.get(&quorum.quorum_entry.quorum_hash) else {
41-
return Err(QuorumValidationError::RequiredBlockNotPresent(quorum.quorum_entry.quorum_hash));
39+
for quorum in &qrinfo.last_commitment_per_index {
40+
let Some(quorum_block_height) = self.block_heights.get(&quorum.quorum_hash) else {
41+
return Err(QuorumValidationError::RequiredBlockNotPresent(quorum.quorum_hash));
4242
};
43-
let llmq_params = quorum.quorum_entry.llmq_type.params();
43+
let llmq_params = quorum.llmq_type.params();
4444
let quorum_index = quorum_block_height % llmq_params.dkg_params.interval;
4545
let cycle_base_height = quorum_block_height - quorum_index;
4646
let cycle_length = llmq_params.dkg_params.interval;

0 commit comments

Comments
 (0)