Skip to content

Commit

Permalink
chore: improve naming and typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
grumbach committed Apr 16, 2024
1 parent c69e5de commit e92b8e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sn_client/src/audit/spend_dag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ impl SpendDag {
self.spends
.insert(spend_addr, DagEntry::Spend(Box::new(spend.clone()), idx));
let node_idx = NodeIndex::new(idx);
self.reset_edges(node_idx);
self.remove_all_edges(node_idx);
node_idx
}
// or upgrade spend to double spend if it is different from the existing one
Expand Down Expand Up @@ -354,7 +354,7 @@ impl SpendDag {
}

/// Remove all edges from a Node in the DAG
fn reset_edges(&mut self, node: NodeIndex) {
fn remove_all_edges(&mut self, node: NodeIndex) {
let incoming: Vec<_> = self
.dag
.edges_directed(node, petgraph::Direction::Incoming)
Expand Down
2 changes: 1 addition & 1 deletion sn_client/src/audit/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ fn test_spend_dag_double_spend_branches() -> Result<()> {
}]);
assert_eq!(got, expected, "spend3a should be unspendable");

// make sur all the descendants further down the branch are marked as bad as well
// make sure all the descendants further down the branch are marked as bad as well
let utxo_of_5a = SpendAddress::from_unique_pubkey(
&net.wallets
.get(&owner5a)
Expand Down

0 comments on commit e92b8e4

Please sign in to comment.