-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[script/event_graph_bindings] increase #node, cleanup
- Loading branch information
zerin
committed
Feb 11, 2025
1 parent
209b9bf
commit 33960df
Showing
4 changed files
with
98 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import os | ||
# number of nodes | ||
N = 10 | ||
P2PDATASTORE_PATH = '/tmp/p2pdatastore' | ||
SLED_DB_PATH = '/tmp/sleddb' | ||
STARTING_PORT = 53412 | ||
os.system("rm -rf " + P2PDATASTORE_PATH+"*") | ||
os.system("rm -rf " + SLED_DB_PATH+"*") | ||
OUTBOUND_TIMEOUT = 2 | ||
CH_HANDSHAKE_TIMEOUT = 15 | ||
CH_HEARTBEAT_INTERVAL = 15 | ||
DISCOVERY_COOLOFF = 15 | ||
DISCOVERY_ATTEMPT = 5 | ||
REFINERY_INTERVAL = 15 | ||
WHITE_CONNECT_PERCENT = 70 | ||
GOLD_CONNECT_COUNT = 2 | ||
TIME_NO_CON = 60 | ||
W8_TIME = 60 | ||
W8_TIME_4_CON = 40 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from darkfi_eventgraph_py import p2p | ||
|
||
async def start_p2p(w8_time, node): | ||
await p2p.start_p2p(w8_time, node) | ||
|
||
async def stop_p2p(w8_time, node): | ||
await p2p.stop_p2p(w8_time, node) | ||
|
||
async def get_fut_p2p(settings): | ||
node = await p2p.new_p2p(settings) | ||
return node | ||
|
||
def is_connected(node): | ||
return p2p.is_connected(node) |