Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
for response in responses:
if len(responses) == 1 or responses.count(response) > len(responses) / 2 + .1:
pass
async def _getblockheaderatheight(self, blockheight):
pass
async def _getblockheaderforhash(self, blockhash):
pass
async def _sendrawtransaction(self, rawtransaction):
pass
class RPCServer:
router = aiomas.rpc.Service()
@router.expose
def getrawtransaction(self, a, b):
return a + b
if __name__ == '__main__':
rpc_server = RPCServer()
headers_repository = HeadersSQLiteRepository(database.session)
interface = ConnectrumInterface(settings.NETWORK, connections_concurrency_ratio=4, concurrency=3)
interface.add_headers_repository(headers_repository)
reactor = ConnectrumReactor(headers_repository, interface, rpc_server)
reactor.start()
from typing import Tuple, Dict
import aiomas
class ElectrodRPCServer:
router = aiomas.rpc.Service()
def __init__(self, endpoint: (str, Tuple), repository):
self.endpoint = endpoint
self.interface = None
self.repo = repository
self._server_instance = None
def set_interface(self, interface):
assert not self.interface, "RPC Server already initialized"
self.interface = interface
def enable_blocks_api(self):
pass
def disable_blocks_api(self):
pass