Skip to content

Commit ef77082

Browse files
committed
bitswap.py add configure_bitswap_peer_selection
1 parent ab8bad2 commit ef77082

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

bindings/python/examples/bitswap.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ def main():
1414
.with_bootstraps(bootstrap_nodes) \
1515
.build()
1616

17+
lattica.configure_bitswap_peer_selection(
18+
top_n=3,
19+
enabled=True,
20+
min_peers=2,
21+
enable_randomness=True,
22+
have_wait_window_ms=100,
23+
min_candidate_ratio=0.3
24+
)
25+
1726
# wait for connection
1827
time.sleep(1)
1928

0 commit comments

Comments
 (0)