work on torgossip
This commit is contained in:
parent
8a6129f4e2
commit
d9c0adcc7b
@ -77,10 +77,10 @@ def block_exec(event, info):
|
||||
if code_b64 in whitelisted_source:
|
||||
return
|
||||
#uncomment when you want to build on the whitelist
|
||||
#else:
|
||||
# with open("../static-data/base64-code-whitelist.txt", "a") as f:
|
||||
# f.write(code_b64 + "\n")
|
||||
# return
|
||||
else:
|
||||
with open("../static-data/base64-code-whitelist.txt", "a") as f:
|
||||
f.write(code_b64 + "\n")
|
||||
return
|
||||
|
||||
for source in whitelisted_code:
|
||||
if info[0].co_filename.endswith(source):
|
||||
|
@ -77,9 +77,13 @@ def _client_pool(shared_state, socket_pool: dict):
|
||||
|
||||
|
||||
def client_loop(shared_state, socket_pool):
|
||||
block_db = shared_state.get_by_string('SafeDB')
|
||||
peer_db = shared_state.get_by_string('TorGossipPeers')
|
||||
|
||||
while True:
|
||||
if not socket_pool:
|
||||
_client_pool(shared_state, socket_pool)
|
||||
sync_
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,7 @@
|
||||
from typing import TYPE_CHECKING
|
||||
if TYPE_CHECKING:
|
||||
from socket import socket
|
||||
|
||||
|
||||
def download_blocks(sock: 'socket', offset: int):
|
||||
sock.sendall()
|
@ -1,4 +1,6 @@
|
||||
from utils.identifyhome import identify_home
|
||||
SERVER_SOCKET = identify_home() + "torgossip.sock"
|
||||
HOSTNAME_FILE = identify_home() + "torgossip-hostname"
|
||||
GOSSIP_PORT = 2020
|
||||
home = identify_home()
|
||||
SERVER_SOCKET = home + "torgossip.sock"
|
||||
HOSTNAME_FILE = home + "torgossip-hostname"
|
||||
CONFIG_FILE = home + "torgossip_config.json"
|
||||
GOSSIP_PORT = 2021
|
||||
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"fanout": 4,
|
||||
"run_server": true
|
||||
}
|
Loading…
Reference in New Issue
Block a user