pybitmessage.knownnodes module

Manipulations with knownNodes dictionary.

addKnownNode(stream, peer, lastseen=None, is_self=False)[source]
cleanupKnownNodes()[source]

Cleanup knownnodes: remove old nodes and nodes with low rating

createDefaultKnownNodes()[source]
decreaseRating(peer)[source]
dns()[source]

Add DNS names to knownnodes

increaseRating(peer)[source]
json_deserialize_knownnodes(source)[source]

Read JSON from source and make knownnodes dict

json_serialize_knownnodes(output)[source]

Reorganize knownnodes dict and write it as JSON to output

pickle_deserialize_old_knownnodes(source)[source]

Unpickle source and reorganize knownnodes dict if it’s in old format the old format was {Peer:lastseen, …} the new format is {Peer:{“lastseen”:i, “rating”:f}}

readKnownNodes()[source]
saveKnownNodes(dirName=None)[source]
trimKnownNodes(recAddrStream=1)[source]