Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
aspect committed Sep 26, 2024
1 parent 1a83014 commit 2e50f75
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 67 deletions.
2 changes: 1 addition & 1 deletion crypto/txscript/src/opcodes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2747,7 +2747,7 @@ mod test {
(1u64, vec![], false), // Case 1: 0 = locktime < txLockTime
(0x800000, vec![0x7f, 0, 0], false), // Case 2: 0 < locktime < txLockTime
(0x800000, vec![0x7f, 0, 0, 0, 0, 0, 0, 0, 0], true), // Case 3: locktime too big
(LOCK_TIME_THRESHOLD * 2, vec![0x7f, 0, 0, 0], true), // Case 4: lock times are inconsistant
(LOCK_TIME_THRESHOLD * 2, vec![0x7f, 0, 0, 0], true), // Case 4: lock times are inconsistent
] {
let mut tx = base_tx.clone();
tx.0.lock_time = tx_lock_time;
Expand Down
4 changes: 2 additions & 2 deletions indexes/utxoindex/src/update_container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ impl UtxoIndexChanges {
}
}

/// Add a [`UtxoDiff`] the the [`UtxoIndexChanges`] struct.
/// Add a [`UtxoDiff`] the [`UtxoIndexChanges`] struct.
pub fn update_utxo_diff(&mut self, utxo_diff: UtxoDiff) {
let (to_add, mut to_remove) = (utxo_diff.add, utxo_diff.remove);

Expand Down Expand Up @@ -53,7 +53,7 @@ impl UtxoIndexChanges {
}
}

/// Add a [`Vec<(TransactionOutpoint, UtxoEntry)>`] the the [`UtxoIndexChanges`] struct
/// Add a [`Vec<(TransactionOutpoint, UtxoEntry)>`] the [`UtxoIndexChanges`] struct
///
/// Note: This is meant to be used when resyncing.
pub fn add_utxos_from_vector(&mut self, utxo_vector: Vec<(TransactionOutpoint, UtxoEntry)>) {
Expand Down
59 changes: 0 additions & 59 deletions metrics/core/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,65 +252,6 @@ pub enum Metric {
}

impl Metric {
// TODO - this will be refactored at a later date
// as this requires changes and testing in /kos
// pub fn group(&self) -> &'static str {
// match self {
// Metric::NodeCpuUsage
// | Metric::NodeResidentSetSizeBytes
// | Metric::NodeVirtualMemorySizeBytes
// | Metric::NodeFileHandlesCount
// | Metric::NodeDiskIoReadBytes
// | Metric::NodeDiskIoWriteBytes
// | Metric::NodeDiskIoReadPerSec
// | Metric::NodeDiskIoWritePerSec
// | Metric::NodeBorshLiveConnections
// | Metric::NodeBorshConnectionAttempts
// | Metric::NodeBorshHandshakeFailures
// | Metric::NodeJsonLiveConnections
// | Metric::NodeJsonConnectionAttempts
// | Metric::NodeJsonHandshakeFailures
// | Metric::NodeBorshBytesTx
// | Metric::NodeBorshBytesRx
// | Metric::NodeJsonBytesTx
// | Metric::NodeJsonBytesRx
// | Metric::NodeP2pBytesTx
// | Metric::NodeP2pBytesRx
// | Metric::NodeGrpcUserBytesTx
// | Metric::NodeGrpcUserBytesRx
// | Metric::NodeTotalBytesTx
// | Metric::NodeTotalBytesRx
// | Metric::NodeBorshBytesTxPerSecond
// | Metric::NodeBorshBytesRxPerSecond
// | Metric::NodeJsonBytesTxPerSecond
// | Metric::NodeJsonBytesRxPerSecond
// | Metric::NodeP2pBytesTxPerSecond
// | Metric::NodeP2pBytesRxPerSecond
// | Metric::NodeGrpcUserBytesTxPerSecond
// | Metric::NodeGrpcUserBytesRxPerSecond
// | Metric::NodeTotalBytesTxPerSecond
// | Metric::NodeTotalBytesRxPerSecond
// | Metric::NodeActivePeers => "system",
// // --
// Metric::NodeBlocksSubmittedCount
// | Metric::NodeHeadersProcessedCount
// | Metric::NodeDependenciesProcessedCount
// | Metric::NodeBodiesProcessedCount
// | Metric::NodeTransactionsProcessedCount
// | Metric::NodeChainBlocksProcessedCount
// | Metric::NodeMassProcessedCount
// | Metric::NodeDatabaseBlocksCount
// | Metric::NodeDatabaseHeadersCount
// | Metric::NetworkMempoolSize
// | Metric::NetworkTransactionsPerSecond
// | Metric::NetworkTipHashesCount
// | Metric::NetworkDifficulty
// | Metric::NetworkPastMedianTime
// | Metric::NetworkVirtualParentHashesCount
// | Metric::NetworkVirtualDaaScore => "kaspa",
// }
// }

pub fn is_key_performance_metric(&self) -> bool {
matches!(
self,
Expand Down
Loading

0 comments on commit 2e50f75

Please sign in to comment.