make getinfo faster so we can use it more in atlas in order to tell if we're talking to a testnet or mainnet node. We'll make it so mainnet nodes and testnet nodes ignore each other.

This commit is contained in:
Jude Nelson
2018-04-29 23:01:57 -04:00
parent 47a577e8fe
commit ef358c891b
4 changed files with 76 additions and 11 deletions

View File

@@ -122,7 +122,7 @@ def db_query_execute(cur, query, values, abort=True, max_timeout=300):
return ret
except sqlite3.OperationalError as oe:
if oe.message == "database is locked":
timeout = min(max_timeout, timeout * 2 + timeout * random.random())
timeout = min(max_timeout, timeout * 1.1 + timeout * random.random())
log.error("Query timed out due to lock; retrying in %s: %s" % (timeout, db_format_query( query, values )))
time.sleep(timeout)