We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 140d2d1 commit c6b77abCopy full SHA for c6b77ab
trin-state/src/network.rs
@@ -35,8 +35,12 @@ impl StateNetwork {
35
// Trigger bonding with bootnodes, at both the base layer and portal overlay.
36
// The overlay ping via talkreq will trigger a session at the base layer, then
37
// a session on the (overlay) portal network.
38
- let guard = self.overlay.discovery.read_with_warn().await;
39
- for enr in guard.discv5.table_entries_enr() {
+ let table_entries = {
+ // use a nested scope so that the guard is quickly dropped
40
+ let guard = self.overlay.discovery.read_with_warn().await;
41
+ guard.discv5.table_entries_enr()
42
+ };
43
+ for enr in table_entries {
44
debug!("Attempting bond with bootnode {}", enr);
45
let ping_result = self
46
.overlay
0 commit comments