Skip to content

Commit 0cafaf8

Browse files
committed
improve saving node stats
1 parent 9550d3b commit 0cafaf8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mytoncore/functions.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,11 @@ def get_ok_error(value: str):
328328
statistics['node'][0] = data
329329
elif statistics['node'][0]['timestamp'] < election_id:
330330
statistics['node'][0] = data
331-
statistics['node'] = statistics.get('node', []) + [data]
332-
statistics['node'].pop(1)
331+
temp = statistics.get('node', []) + [data]
332+
temp.pop(1)
333+
statistics['node'] = temp
333334
local.db["statistics"] = statistics
335+
local.save()
334336

335337

336338
def ReadTransData(local, scanner):

0 commit comments

Comments
 (0)