v0.3.13-pre.010
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-worker-raw-transaction-ingest-lib/src/runtime_resources.rs
|
||||
// version: 24
|
||||
// version: 25
|
||||
|
||||
use sha2::Digest; // rust-rules: trait-import
|
||||
|
||||
@@ -179,6 +179,10 @@ impl RawTransactionIngestSourceInventory {
|
||||
let mut source_continuity_gap_total = 0_u64;
|
||||
let mut source_reconnect_total = 0_u64;
|
||||
let mut source_replay_attempt_total = 0_u64;
|
||||
let source_total = self.source_projections.len();
|
||||
let mut source_active = 0_usize;
|
||||
let mut source_reconnecting = 0_usize;
|
||||
let mut source_failed = 0_usize;
|
||||
let mut any_active = false;
|
||||
let mut any_closing = false;
|
||||
let mut any_failed = false;
|
||||
@@ -200,6 +204,7 @@ impl RawTransactionIngestSourceInventory {
|
||||
source_replay_attempt_total = source_replay_attempt_total.saturating_add(projection.source_replay_attempt_total());
|
||||
match projection.source_state() {
|
||||
std::option::Option::Some(crate::RawTransactionIngestSourceState::Active) => {
|
||||
source_active += 1;
|
||||
any_active = true;
|
||||
all_closed = false;
|
||||
},
|
||||
@@ -209,10 +214,12 @@ impl RawTransactionIngestSourceInventory {
|
||||
},
|
||||
std::option::Option::Some(crate::RawTransactionIngestSourceState::Closed) => {},
|
||||
std::option::Option::Some(crate::RawTransactionIngestSourceState::Failed) => {
|
||||
source_failed += 1;
|
||||
any_failed = true;
|
||||
all_closed = false;
|
||||
},
|
||||
std::option::Option::Some(crate::RawTransactionIngestSourceState::Reconnecting) => {
|
||||
source_reconnecting += 1;
|
||||
any_reconnecting = true;
|
||||
all_closed = false;
|
||||
},
|
||||
@@ -238,7 +245,8 @@ impl RawTransactionIngestSourceInventory {
|
||||
std::option::Option::None
|
||||
};
|
||||
return crate::RawTransactionIngestProcessingFrontierProjection::new(hydration_pending, processing_frontier_slot, oldest_pending_slot)
|
||||
.with_source_continuity(source_state, source_reconnect_total, source_replay_attempt_total, source_continuity_gap_total);
|
||||
.with_source_continuity(source_state, source_reconnect_total, source_replay_attempt_total, source_continuity_gap_total)
|
||||
.with_source_counts(source_total, source_active, source_reconnecting, source_failed);
|
||||
}
|
||||
|
||||
fn new(source_keys: std::vec::Vec<[u8; 32]>) -> Self {
|
||||
|
||||
Reference in New Issue
Block a user