This repository has been archived on 2024-12-02. You can view files and clone it, but cannot push or open issues or pull requests.
PyBitmessage-2024-12-02/src/knownnodes.py

15 lines
321 B
Python
Raw Normal View History

import pickle
import threading
import state
knownNodesLock = threading.Lock()
knownNodes = {}
def saveKnownNodes(dirName = None):
if dirName is None:
dirName = state.appdata
with knownNodesLock:
with open(dirName + 'knownnodes.dat', 'wb') as output:
pickle.dump(knownNodes, output)