Commit Graph

84 Commits

Author SHA1 Message Date
aed71c11ab
test case for sqlthread version 1 2021-04-07 15:47:41 +05:30
b6155b1af3
fix db migration issue 2021-04-07 15:47:41 +05:30
42007d02ad
fix DB thread issue 2021-04-07 15:47:31 +05:30
0dfc4dac7b
test commit 2021-04-07 15:47:31 +05:30
bb38c158fe
Refactoring of database upgrade mechanism 2021-04-07 15:47:30 +05:30
583e5910fe
proper inherit remove return from __init__ 2021-04-07 15:47:30 +05:30
31c5e4ff38
remove no in case 2021-04-07 15:47:30 +05:30
cdc2977331
Migrate Db with respect to their versions 2021-04-07 15:47:29 +05:30
navjot
a5786f72e6
replace print with logger and remove unused file 2021-04-07 15:47:25 +05:30
navjot
07a1ce9914
imported helper_addressGenerator module 2021-04-07 15:47:24 +05:30
navjot
7825229444
updated addressbook table in class_sqlThread module 2021-04-07 15:47:24 +05:30
184664d758
SQL operations asserts and code quality
- complain if trying to execute SQL statements without a running
  `.threads.sqlThread`. This is to give better test feedback if used
  incorrectly
- refactor `.helper_sql.sql_ready` as a `threading.Event`
- code quality
2021-01-01 17:54:05 +01:00
lakshyacis
6f35da4096
Imported packages sequencing and formatting 2020-01-30 12:14:40 +05:30
lakshyacis
b6a81f1252
Formatting and fix License 2020-01-15 16:17:26 +05:30
lakshyacis
a9991a7a5a
class_sqlThread pylint fixes 2019-11-25 15:13:52 +05:30
lakshyacis
dbbf454c15
class_sqlThread flake8 fixes 2019-11-25 15:13:52 +05:30
341651973a
Reduced imports:
- exported from network package all objects used outside;
  - made all threads available in threads module.

Wrote some module docstrings.
2019-11-11 12:03:03 +02:00
ba5caf3fda
Sorted out configuration loading/updating a bit:
- used BMConfigParser.safeGet.. methods instead of try .. except
  - moved all config checks from class_sqlThread into helper_startup
  - commented out initialization of settings which are then rewritten
    by updateConfig()
2018-07-04 17:59:58 +03:00
coffeedogs
c99c3fc782
Fixed: Codacy issues in src/class_*.py 2018-05-03 19:05:39 +01:00
Mahendra
1a36361ef9
replace all random.xxx with helper random function 2018-03-21 19:26:27 +05:30
9f4a1fa0a4
Config file defaults and address unification
- bmconfigpaser.py now allows to put default values for a specific
option in the file
- addresses as sections are now detected by "BM-" rather than
just ignoring bitmessagesettings. There can now be other sections
with a cleaner config file
2017-05-15 12:18:07 +02:00
511b89ebbe
PoW Worker should wait for sql thread to init
- I think this was causing freezing queue on launch if not empty
- I can't reproduce the bug anymore
2017-02-26 20:44:56 +01:00
6062277d60
Rename configparser.py to bmconfigparser.py
- it was causing problems with py2app because the source of python's own
  CongigParser is also configparser.py
2017-02-22 09:34:54 +01:00
Justin Ramos
fd95f8f519
allowing for max outbound connection configuration
Signed-off-by: Justin Ramos <justin.ramos@gmail.com>
2017-02-21 16:28:54 -06:00
157881bc63
Cyclic import fix
- networkDefaultProofOfWorkNonceTrialsPerByte and
  networkDefaultPayloadLengthExtraBytes cyclic import fix
- PyBitmessage should launch now when there's no keys.dat
2017-02-08 20:37:42 +01:00
59f3a2fbe7
Reduce cyclic dependencies
- rearranged code to reduce cyclic dependencies
- doCleanShutdown is separated in shutdown.py
- shared queues are separated in queues.py
- some default values were moved to defaults.py
- knownnodes partially moved to knownnodes.py
2017-02-08 13:41:56 +01:00
8cb0953401
Moved writeKeysFile into configparser
- shared.writeKeysFile -> BMConfigParser().save
- makes it easier to get rid of circular imports
2017-01-15 10:50:02 +01:00
fa0a3135e7
Fixes pointed out by landscape.io
- missing/wrong/obsolete imports
- logger formatting
2017-01-11 17:26:25 +01:00
ac348e4e6b
Fixes and refactoring
- fixes errors introduced in the earlier refactoring
- more variables moved to state.py
- path finding functions moved to paths.py
- remembers IPv6 network unreachable (in the future can be used to skip
  IPv6 for a while)
2017-01-11 17:00:00 +01:00
8bcfe80ad0
Refactoring of config parser and shared.py
- got rid of shared config parser and made it into a singleton
- refactored safeConfigGetBoolean as a method of the config singleton
- refactored safeConfigGet as a method of the config singleton
- moved softwareVersion from shared.py into version.py
- moved some global variables from shared.py into state.py
- moved some protocol-specific functions from shared.py into protocol.py
2017-01-11 14:27:19 +01:00
Marius Ghita
7aecb4aad1 Hide connection notifications configuration option
New option on the User Interface settings tab, to hide connection
notification messages.
2016-10-11 19:14:06 +02:00
685ff6cecd
Startup fixes
- correctly test for "smtpdeliver" variable without crashing
- new method for safely getting values from config even if the option
  may be missing
2016-06-30 15:19:58 +02:00
6895da7f65
Quit immediately if disk full
- PyBitmessage only used to quit on disk full when running in daemon
  mode. When this happened with the QT-GUI, it would end up in a
  half-frozen status instead. Quitting is a safer choice

Fixes #572
2016-06-29 22:08:34 +02:00
1a40c29d22
Add Tor hidden service support
- PyBitmessage can now run as a hidden service on Tor
- three new variables in keys.dat: onionhostname, onionport, onionbindip
- you need to manually add a hidden service to tor
2016-06-07 21:59:48 +02:00
mailchuck
9edde110a2 Translation update
Some function calls were not being identified as text that should be
translated.
2016-05-02 15:00:26 +02:00
mailchuck
66824c32d1 sqlExecute now returns rowcount
This allows tracking of how many rows were changed, for example for
UPDATE, DELETE, INSERT.
2016-05-02 15:00:24 +02:00
mailchuck
17d045da10 Sensible default maximum difficulty
Fixes #144
2016-05-02 15:00:22 +02:00
mailchuck
5a45d7dd8f Portable mode fixes
Fixes Bitmessage#379, Bitmessage#341
2016-05-02 15:00:22 +02:00
mailchuck
231219a193 Improved logging
Fixes #118

- changed almost all "print" into logger
- threads have nicer names
- logger can have configuration in "logger.dat" in the same directory as
"keys.dat", and the logger will pick the one named "default" to replace
the "console" and "file" that are in PyBitmessage otherwise

Example file for logging to syslog:

[loggers]
keys = root,syslog

[logger_root]
level=NOTSET
handlers=syslog

[logger_syslog]
level=DEBUG
handlers=syslog
qualname=default

[handlers]
keys = syslog

[handler_syslog]
class = handlers.SysLogHandler
formatter = syslog
level = DEBUG
args=(('localhost', handlers.SYSLOG_UDP_PORT),
handlers.SysLogHandler.LOG_LOCAL7)

[formatters]
keys = syslog

[formatter_syslog]
format=%(asctime)s %(threadName)s %(filename)s@%(lineno)d %(message)s
datefmt=%b %d %H:%M:%S
2016-05-02 15:00:21 +02:00
mailchuck
e9a908aa83 Sqlite secure delete
Fixes #102
2016-05-02 15:00:20 +02:00
Peter Surda
69309b82fb Minor changes in cli, PoW, and a couple of new api calls. 2016-05-02 15:00:17 +02:00
Jonathan Warren
cc712cb8ff finished work on specifyTTL 2015-03-09 02:35:32 -04:00
Jonathan Warren
9044e84093 some specifyTTL work completed 2015-03-03 14:04:12 -05:00
Jonathan Warren
95c939a2a0 Fix #748 - Check hash of sig instead of message contents 2015-02-20 21:03:20 -05:00
Jonathan Warren
50c392c197 resolve merge conflict 2014-12-25 20:37:04 -05:00
Jonathan Warren
3ef83c2f95 Leftover change from clearing ProtoV2 code: increment settings version from 7 to 8 2014-12-25 19:23:16 -05:00
Jonathan Warren
e898b40203 Removed obsolete Protocol v2 code 2014-12-25 04:06:57 -05:00
Yuri
34824c044e Moved all keys.dat writing code into writeKeysFile in shared.py 2014-09-14 23:34:33 -07:00
Jonathan Warren
0865e863ec Added ability to limit network transfer rate 2014-09-10 16:47:51 -04:00
Jonathan Warren
c84cdecba4 Normalize the noncetrialsperbyte and payloadlengthextrabytes for each of the user's existing addresses 2014-09-02 19:25:03 -04:00