Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re6stnet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
re6stnet
Commits
ba5ef3d6
Commit
ba5ef3d6
authored
Jul 06, 2012
by
Ulysse Beaugnon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the index on ip in the peers DB : not needed any more
parent
abacdb1a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
main.py
main.py
+1
-2
No files found.
main.py
View file @
ba5ef3d6
...
...
@@ -15,7 +15,7 @@ def log_message(message, verbose_level):
print
time
.
strftime
(
"%d-%m-%Y %H:%M:%S : "
+
message
)
# TODO : How do we get our vifib ip ?
# TODO : flag in some way the peers that are connected to us so we don't connect to them
class
PeersDB
:
def
__init__
(
self
,
dbPath
):
log_message
(
'Connectiong to peers database'
,
4
)
...
...
@@ -28,7 +28,6 @@ class PeersDB:
proto TEXT NOT NULL,
used INTEGER NOT NULL)"""
)
self
.
db
.
execute
(
"CREATE INDEX IF NOT EXISTS _peers_used ON peers(used)"
)
self
.
db
.
execute
(
"CREATE INDEX IF NOT EXISTS _peers_ip ON peers(ip)"
)
self
.
db
.
execute
(
"UPDATE peers SET used = 0"
)
def
getUnusedPeers
(
self
,
nPeers
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment