From 481cb5aeffef1e7e5fff4b5fc6643700b2d5ccb8 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Sat, 21 Mar 2020 01:15:07 -0500 Subject: [PATCH] use a smaller offset for obscuring block metadb time --- src/coredb/blockmetadb/add.py | 2 +- tests/runtime-result.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coredb/blockmetadb/add.py b/src/coredb/blockmetadb/add.py index 8874617a..682d3be4 100644 --- a/src/coredb/blockmetadb/add.py +++ b/src/coredb/blockmetadb/add.py @@ -36,7 +36,7 @@ def add_to_block_DB(newHash, selfInsert=False, dataSaved=False): raise BlockMetaEntryExists conn = sqlite3.connect(dbfiles.block_meta_db, timeout=onionrvalues.DATABASE_LOCK_TIMEOUT) c = conn.cursor() - currentTime = epoch.get_epoch() + secrets.randbelow(301) + currentTime = epoch.get_epoch() + secrets.randbelow(61) if selfInsert or dataSaved: selfInsert = 1 else: diff --git a/tests/runtime-result.txt b/tests/runtime-result.txt index 69cddc63..dbc2696d 100644 --- a/tests/runtime-result.txt +++ b/tests/runtime-result.txt @@ -1 +1 @@ -1584652661 \ No newline at end of file +1584769913 \ No newline at end of file