Skip to content
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
1 change: 1 addition & 0 deletions dash-spv-ffi/src/callbacks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ impl FFISyncEventCallbacks {
}
SyncEvent::MasternodeStateUpdated {
height,
..
} => {
if let Some(cb) = self.on_masternode_state_updated {
cb(*height, self.user_data);
Expand Down
24 changes: 21 additions & 3 deletions dash-spv/src/sync/events.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::sync::ManagerIdentifier;
use dashcore::ephemerealdata::chain_lock::ChainLock;
use dashcore::ephemerealdata::instant_lock::InstantLock;
use dashcore::sml::masternode_list_engine::QRInfoFeedResult;
use dashcore::{Address, BlockHash, Txid};
use key_wallet_manager::{FilterMatchKey, WalletId};
use std::collections::{BTreeMap, BTreeSet};
Expand Down Expand Up @@ -117,6 +118,14 @@ pub enum SyncEvent {
MasternodeStateUpdated {
/// New masternode state height
height: u32,
/// QRInfo processing result when this update came through the
/// QuorumValidation pipeline. `None` for Incremental (MnListDiff-only)
/// updates. Consumers that care about rotation cycle storage (e.g.
/// IS lock verification across rotation) can gate on
/// `result.all_fully_verified()` together with
/// `result.stored_cycle_height` to know which cycle was fully
/// verified and stored in `rotated_quorums_per_cycle` by this update.
qr_info_result: Option<QRInfoFeedResult>,
},

/// A manager encountered a recoverable error.
Expand Down Expand Up @@ -225,9 +234,18 @@ impl SyncEvent {
}
SyncEvent::MasternodeStateUpdated {
height,
} => {
format!("MasternodeStateUpdated(height={})", height)
}
qr_info_result,
} => match qr_info_result {
Some(s) => format!(
"MasternodeStateUpdated(height={}, qr_info={{stored_cycle_height={:?}, verified={}/{}, newly_qualified={}}})",
height,
s.stored_cycle_height,
s.fully_verified_count,
s.rotated_quorum_count,
s.newly_qualified_count,
),
None => format!("MasternodeStateUpdated(height={})", height),
},
SyncEvent::ManagerError {
manager,
error,
Expand Down
Loading
Loading