1
0

Spread payment requests to subdirs

Currently Electrum stores all payment requests in main requests
directory. It's not going to be efficient when we have thousands of
thousands of payment requests. This patch spreads that files across
two level of subdirectories.
This commit is contained in:
Serge Victor
2016-10-01 05:40:40 +00:00
parent dfef56491b
commit 55d392c274
3 changed files with 15 additions and 8 deletions

View File

@@ -63,7 +63,7 @@ class WsClientThread(util.DaemonThread):
def make_request(self, request_id):
# read json file
rdir = self.config.get('requests_dir')
n = os.path.join(rdir, request_id + '.json')
n = os.path.join(rdir, 'req', request_id[0], request_id[1], request_id, request_id + '.json')
with open(n) as f:
s = f.read()
d = json.loads(s)