Esempio n. 1
0
 def __init__(self, node, router, signing_key, database, audit=True):
     self.router = router
     self.node = node
     RPCProtocol.__init__(self, node, router)
     self.log = Logger(system=self)
     self.audit = Audit(db=database, enabled=audit)
     self.multiplexer = None
     self.db = database
     self.signing_key = signing_key
     self.listeners = []
     self.handled_commands = [
         GET_CONTRACT,
         GET_IMAGE,
         GET_PROFILE,
         GET_LISTINGS,
         GET_USER_METADATA,
         GET_CONTRACT_METADATA,
         FOLLOW,
         UNFOLLOW,
         GET_FOLLOWERS,
         GET_FOLLOWING,
         BROADCAST,
         MESSAGE,
         ORDER,
         ORDER_CONFIRMATION,
         COMPLETE_ORDER,
         DISPUTE_OPEN,
         DISPUTE_CLOSE,
         GET_RATINGS,
         REFUND,
     ]
Esempio n. 2
0
 def __init__(self, sourceNode, storage, ksize, database):
     self.ksize = ksize
     self.router = RoutingTable(self, ksize, sourceNode)
     self.storage = storage
     self.sourceNode = sourceNode
     self.multiplexer = None
     self.db = database
     self.log = Logger(system=self)
     self.handled_commands = [PING, STUN, STORE, DELETE, FIND_NODE, FIND_VALUE, HOLE_PUNCH]
     RPCProtocol.__init__(self, sourceNode, self.router)
Esempio n. 3
0
 def __init__(self, sourceNode, storage, ksize, database, signing_key):
     self.ksize = ksize
     self.router = RoutingTable(self, ksize, sourceNode)
     self.storage = storage
     self.sourceNode = sourceNode
     self.multiplexer = None
     self.db = database
     self.signing_key = signing_key
     self.log = Logger(system=self)
     self.handled_commands = [PING, STUN, STORE, DELETE, FIND_NODE, FIND_VALUE, HOLE_PUNCH, INV, VALUES]
     self.recent_transfers = set()
     RPCProtocol.__init__(self, sourceNode, self.router)
Esempio n. 4
0
 def __init__(self, sourceNode, storage, ksize, database, signing_key):
     self.ksize = ksize
     self.router = RoutingTable(self, ksize, sourceNode)
     self.storage = storage
     self.sourceNode = sourceNode
     self.multiplexer = None
     self.db = database
     self.signing_key = signing_key
     self.log = Logger(system=self)
     self.handled_commands = [PING, STUN, STORE, DELETE, FIND_NODE, FIND_VALUE, HOLE_PUNCH, INV, VALUES]
     self.recent_transfers = set()
     RPCProtocol.__init__(self, sourceNode, self.router)
Esempio n. 5
0
 def __init__(self, node, router, signing_key, database):
     self.router = router
     self.node = node
     RPCProtocol.__init__(self, node, router)
     self.log = Logger(system=self)
     self.multiplexer = None
     self.db = database
     self.signing_key = signing_key
     self.listeners = []
     self.handled_commands = [GET_CONTRACT, GET_IMAGE, GET_PROFILE, GET_LISTINGS, GET_USER_METADATA,
                              GET_CONTRACT_METADATA, FOLLOW, UNFOLLOW, GET_FOLLOWERS, GET_FOLLOWING,
                              BROADCAST, MESSAGE, ORDER, ORDER_CONFIRMATION, COMPLETE_ORDER, DISPUTE_OPEN,
                              DISPUTE_CLOSE, GET_RATINGS, REFUND]