added notion of expiration to snapshot. Full scan to trim the snapshot is no longer needed
This commit is contained in:
@@ -31,13 +31,11 @@ function public.start_scan()
|
||||
private.process_auction(auction_info)
|
||||
end,
|
||||
on_complete = function()
|
||||
private.update_snapshot()
|
||||
Aux.log('Scan complete: Old auctions were removed from the snapshot.')
|
||||
-- AuxHistoryStopButton:Hide()
|
||||
-- AuxHistoryScanButton:Show()
|
||||
end,
|
||||
on_abort = function()
|
||||
|
||||
Aux.log('Scanning aborted.')
|
||||
-- AuxHistoryStopButton:Hide()
|
||||
-- AuxHistoryScanButton:Show()
|
||||
@@ -55,15 +53,6 @@ function public.stop_scan()
|
||||
Aux.scan.abort()
|
||||
end
|
||||
|
||||
function private.update_snapshot()
|
||||
local snapshot = Aux.persistence.load_snapshot()
|
||||
for _, sig in ipairs(snapshot.values()) do
|
||||
if not private.scanned_signatures.contains(sig) then
|
||||
snapshot.remove(sig)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function private.process_auction(auction_info)
|
||||
private.scanned_signatures.add(auction_info.signature)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user