work on new peer profiling system

This commit is contained in:
Kevin Froman 2018-07-26 22:07:50 -05:00
parent 5f1a02e42d
commit afdee2a7a5
No known key found for this signature in database
GPG key ID: 0D414D0FE405B63B
6 changed files with 77 additions and 97 deletions

View file

@ -575,9 +575,10 @@ class Core:
# TODO: validate key on whitelist
if key not in ('address', 'type', 'knownPeer', 'speed', 'success', 'DBHash', 'failure', 'lastConnect'):
raise Exception("Got invalid database key when setting address info")
c.execute('UPDATE adders SET ' + key + ' = ? WHERE address=?', command)
conn.commit()
conn.close()
else:
c.execute('UPDATE adders SET ' + key + ' = ? WHERE address=?', command)
conn.commit()
conn.close()
return
def getBlockList(self, unsaved = False): # TODO: Use unsaved??