Skip to content

Commit e007698

Browse files
committed
add thread to save past events
1 parent 34539fd commit e007698

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mytoncore/functions.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,11 @@ def Slashing(local, ton):
506506
# end define
507507

508508

509+
def save_past_events(local, ton):
510+
local.try_function(ton.GetElectionEntries)
511+
local.try_function(ton.GetComplaints)
512+
513+
509514
def ScanLiteServers(local, ton):
510515
# Считать список серверов
511516
filePath = ton.liteClient.configPath
@@ -540,6 +545,7 @@ def General(local):
540545
local.start_cycle(Elections, sec=600, args=(local, ton, ))
541546
local.start_cycle(Statistics, sec=10, args=(local, ))
542547
local.start_cycle(Offers, sec=600, args=(local, ton, ))
548+
local.start_cycle(save_past_events, sec=300, args=(local, ton, ))
543549

544550
t = 600
545551
if ton.GetNetworkName() != 'mainnet':

0 commit comments

Comments
 (0)