pybitmessage.class_singleWorker module¶
Thread for performing PoW
-
class
singleWorker
[source]¶ Bases:
pybitmessage.network.threads.StoppableThread
Thread for performing PoW
-
stopThread
()¶ Signal through the queue that the thread should be stopped
-
run
()¶ Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
-
doPOWForMyV2Pubkey
(adressHash)¶ This function also broadcasts out the pubkey message once it is done with the POW
-
sendOutOrStoreMyV3Pubkey
(adressHash)¶ If this isn’t a chan address, this function assembles the pubkey data, does the necessary POW and sends it out. If it is a chan then it assembles the pubkey and stores it in the pubkey table so that we can send messages to “ourselves”.
-
sendOutOrStoreMyV4Pubkey
(myAddress)¶ It doesn’t send directly anymore. It put is to a queue for another thread to send at an appropriate time, whereas in the past it directly appended it to the outgoing buffer, I think. Same with all the other methods in this class.
-
sendOnionPeerObj
(peer=None)¶ Send onionpeer object representing peer
-
sendBroadcast
()¶ Send a broadcast-type object (assemble the object, perform PoW and put it to the inv announcement queue)
-
sendMsg
()¶ Send a message-type object (assemble the object, perform PoW and put it to the inv announcement queue)
-
requestPubKey
(toAddress)¶ Send a getpubkey object
-
generateFullAckMessage
(ackdata, TTL)¶ Create ACK packet
-