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
4 changes: 2 additions & 2 deletions stackslib/src/chainstate/stacks/index/marf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1588,12 +1588,12 @@ impl<T: MarfTrieId> MARF<T> {

/// Access internal storage
#[cfg(test)]
pub fn borrow_storage_backend(&mut self) -> TrieStorageConnection<T> {
pub fn borrow_storage_backend(&mut self) -> TrieStorageConnection<'_, T> {
self.storage.connection()
}

#[cfg(test)]
pub fn borrow_storage_transaction(&mut self) -> TrieStorageTransaction<T> {
pub fn borrow_storage_transaction(&mut self) -> TrieStorageTransaction<'_, T> {
self.storage.transaction().unwrap()
}

Expand Down
29 changes: 19 additions & 10 deletions stackslib/src/net/tests/convergence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,10 @@ fn test_walk_ring_15_org_biased() {
})
}

fn test_walk_ring_ex(peer_configs: &mut Vec<TestPeerConfig>, test_pingback: bool) -> Vec<TestPeer> {
fn test_walk_ring_ex(
peer_configs: &mut Vec<TestPeerConfig>,
test_pingback: bool,
) -> Vec<TestPeer<'_>> {
// arrange neighbors into a "ring" topology, where
// neighbor N is connected to neighbor (N-1)%NUM_NEIGHBORS and (N+1)%NUM_NEIGHBORS.
// If test_pingback is true, then neighbor N is only connected to (N+1)%NUM_NEIGHBORS
Expand Down Expand Up @@ -303,11 +306,11 @@ fn test_walk_ring_ex(peer_configs: &mut Vec<TestPeerConfig>, test_pingback: bool
peers
}

fn test_walk_ring(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer> {
fn test_walk_ring(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer<'_>> {
test_walk_ring_ex(peer_configs, false)
}

fn test_walk_ring_pingback(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer> {
fn test_walk_ring_pingback(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer<'_>> {
test_walk_ring_ex(peer_configs, true)
}

Expand Down Expand Up @@ -453,15 +456,18 @@ fn test_walk_line_15_pingback() {
})
}

fn test_walk_line(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer> {
fn test_walk_line(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer<'_>> {
test_walk_line_ex(peer_configs, false)
}

fn test_walk_line_pingback(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer> {
fn test_walk_line_pingback(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer<'_>> {
test_walk_line_ex(peer_configs, true)
}

fn test_walk_line_ex(peer_configs: &mut Vec<TestPeerConfig>, pingback_test: bool) -> Vec<TestPeer> {
fn test_walk_line_ex(
peer_configs: &mut Vec<TestPeerConfig>,
pingback_test: bool,
) -> Vec<TestPeer<'_>> {
// arrange neighbors into a "line" topology.
// If pingback_test is true, then the topology is unidirectional:
//
Expand Down Expand Up @@ -659,15 +665,18 @@ fn test_walk_star_15_org_biased() {
})
}

fn test_walk_star(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer> {
fn test_walk_star(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer<'_>> {
test_walk_star_ex(peer_configs, false)
}

fn test_walk_star_pingback(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer> {
fn test_walk_star_pingback(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer<'_>> {
test_walk_star_ex(peer_configs, true)
}

fn test_walk_star_ex(peer_configs: &mut Vec<TestPeerConfig>, pingback_test: bool) -> Vec<TestPeer> {
fn test_walk_star_ex(
peer_configs: &mut Vec<TestPeerConfig>,
pingback_test: bool,
) -> Vec<TestPeer<'_>> {
// arrange neighbors into a "star" topology.
// If pingback_test is true, then initial connections are unidirectional -- each neighbor (except
// for 0) only knows about 0. Neighbor 0 knows about no one.
Expand Down Expand Up @@ -718,7 +727,7 @@ fn test_walk_star_ex(peer_configs: &mut Vec<TestPeerConfig>, pingback_test: bool
peers
}

fn test_walk_inbound_line(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer> {
fn test_walk_inbound_line(peer_configs: &mut Vec<TestPeerConfig>) -> Vec<TestPeer<'_>> {
// arrange neighbors into a two-tiered "line" topology, where even-numbered neighbors are
// "NAT'ed" but connected to both the predecessor and successor odd neighbors. Odd
// numbered neighbors are not connected to anyone. The first and last even-numbered
Expand Down
2 changes: 1 addition & 1 deletion stackslib/src/net/tests/download/epoch2x.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ pub fn run_get_blocks_and_microblocks<T, F, P, C, D>(
mut peer_func: P,
mut check_breakage: C,
mut done_func: D,
) -> Vec<TestPeer>
) -> Vec<TestPeer<'_>>
where
T: FnOnce(&mut Vec<TestPeerConfig>),
F: FnOnce(
Expand Down