Commit Graph

17 Commits

Author SHA1 Message Date
Peter Šurda c85d52b8e8
Asyncore updates
- asyncore is now on by default
- inv announcements implemented
- bandwidth limit implemented / fixed
- stats on download / upload speed now work
- make prints into logger
- limit knownNodes to 20k as it was before
- green light fixed
- other minor fixes
2017-05-29 00:24:07 +02:00
Peter Šurda 9683c879bc
Asyncore update
- Network status UI works but current speed isn't implemented yet
- Track per connection and global transferred bytes
- Add locking to write queue so that other threads can put stuff
there
- send ping on timeout (instead of closing the connection)
- implement open port checker (untested, never triggered yet)
- error handling on IO
2017-05-25 14:59:18 +02:00
Peter Šurda 1af49a0165
Download tracking refactoring
- replace PendingDownload singleton dict with a Queue
- total memory and CPU requirements should be reduced
- get rid of somObjectsOfWhichThisRemoteNodeIsAlearedyAware. It has very
little practicle effect and only uses memory
2017-03-19 22:08:00 +01:00
Peter Šurda 741ac5ca05
UPnP recommendation notification fixes
- notify also if no connections and no change
2017-02-27 16:18:22 +01:00
Peter Šurda cd0972c0f3
Recommend enabling UPnP on network problems
- it looks like there aren't enough listening nodes
- if connection is dropped, notify non-proxy users about the UPnP option
2017-02-27 15:30:19 +01:00
Peter Šurda 5ae1327edc
Download/upload shutdown fixes
- Missing renamed to PendingDownload
- PendingDownload now only retries 3 times rather than 6 to dowload an
  object
- Added PendingUpload, replacing invQueueSize
- PendingUpload has both the "len" method (number of objects not
  uploaded) as well as "progress" method, which is a float from 0
  (nothing done) to 1 (all uploaded) which considers not only objects
  but also how many nodes they are uploaded to
- PendingUpload tracks when the object is successfully uploaded to the
  remote node instead of just adding an arbitrary time after they have
  been send the corresponding "inv"
- Network status tab's "Objects to be synced" shows the sum of
  PendingUpload and PendingDownload sizes
2017-01-19 19:48:12 +01:00
Peter Šurda f079ff5b99
Refactor objects to be downloaded
- moved logic into a Missing singleton
- shouldn't try to download duplicates anymore, only requests a hash
  once every 5 minutes and not from the same host
- removed obsoleted variables
- the "Objects to be synced" in the Network tab should now be correct
- removed some checks which aren't necessary anymore in my opinion
- fix missing self in Throttle (thanks landscape.io)
2017-01-15 19:21:24 +01:00
Peter Šurda 689d697a40
Refactor bandwidth limit and speed calculator
- also fixes potential deadlocks
2017-01-14 23:21:00 +01:00
Peter Šurda e84b19613e
Inventory refactoring
- minor refactoring, made it into singleton instead of a shared global
  variable. This makes it a little bit cleaner and moves the class into
a separate file
- removed duplicate inventory locking
- renamed singleton.py to singleinstance.py (this is the code that
  ensures only one instance of PyBitmessage runs at the same time)
2017-01-10 21:15:35 +01:00
Peter Šurda e8b1e1adcf Localisation update
The plural/paucal form support was not compatible with pylupdate4, it
didn't correctly parse the 3-argument calls to translate.

This fixes it, and updates the sources accordingly.
2016-05-02 15:00:26 +02:00
mailchuck cb1c8157fe Objects to be synced timer
Now updates together with bandwidth every 2 seconds.
2016-05-02 15:00:26 +02:00
mailchuck c29f266020 Translation fixes
- locale name is properly normalised rather than simply changing the
string
- translations now support plurals/paucals
- networkstatus updated
2016-05-02 15:00:26 +02:00
Peter Šurda 38700a1721 Network Status tab translations update
- remembers startup time
- kB instead of KB
- stream table and status texts scale and aren't cut if they translated
text doesn't fit
2016-05-02 15:00:25 +02:00
Peter Šurda 412e175f27 Translation updates
Added a RetranslateMixin. Since PyQT does not support automated language
changes of UI files (like the C++ QT does), this implements something
similar. It assumes that the UI file has the same name as the class, but
lowercase.

Added RetraslateMixin to the new blacklist and networkstatus interfaces.
2016-05-02 15:00:25 +02:00
Peter Šurda 8b605a874a Translation updates
- add missing files into translation definition
- refresh english strings
- change context for "networkstatus"
2016-05-02 15:00:25 +02:00
mirrorwish 337cf93b4b Fix byte formatting 2016-05-02 15:00:25 +02:00
mirrorwish a23022b2db Refactor Network Status tab 2016-05-02 15:00:24 +02:00