Merge pull request #43 from Atheros1/master
Subscribe by default to new releases and announcements
This commit is contained in:
commit
de079890b8
|
@ -2158,7 +2158,7 @@ class sqlThread(QThread):
|
|||
self.cur.execute( '''CREATE TABLE pubkeys (hash blob, havecorrectnonce bool, transmitdata blob, time blob, usedpersonally text, UNIQUE(hash, havecorrectnonce, transmitdata) ON CONFLICT REPLACE)''' )
|
||||
self.cur.execute( '''CREATE TABLE inventory (hash blob, objecttype text, streamnumber int, payload blob, receivedtime integer, UNIQUE(hash) ON CONFLICT REPLACE)''' )
|
||||
self.cur.execute( '''CREATE TABLE knownnodes (timelastseen int, stream int, services blob, host blob, port blob, UNIQUE(host, stream, port) ON CONFLICT REPLACE)''' ) #This table isn't used in the program yet but I have a feeling that we'll need it.
|
||||
|
||||
self.cur.execute( '''INSERT INTO subscriptions VALUES('Bitmessage new release/announcements','BM-BbkPSZbzPwpVcYZpU4yHwf9ZPEapN5Zx',1)''')
|
||||
self.conn.commit()
|
||||
print 'Created messages database file'
|
||||
except Exception, err:
|
||||
|
|
|
@ -41,6 +41,15 @@ def readSent():
|
|||
for row in output:
|
||||
print row
|
||||
|
||||
def readSubscriptions():
|
||||
print 'Printing everything in subscriptions table:'
|
||||
item = '''select * from subscriptions'''
|
||||
parameters = ''
|
||||
cur.execute(item, parameters)
|
||||
output = cur.fetchall()
|
||||
for row in output:
|
||||
print row
|
||||
|
||||
def readPubkeys():
|
||||
print 'Printing everything in pubkeys table:'
|
||||
item = '''select hash, havecorrectnonce, transmitdata, time, usedpersonally from pubkeys'''
|
||||
|
@ -71,6 +80,7 @@ def takeSentMessagesOutOfTrash():
|
|||
#takeSentMessagesOutOfTrash()
|
||||
#readInbox()
|
||||
#readSent()
|
||||
readPubkeys()
|
||||
#readPubkeys()
|
||||
readSubscriptions()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user