Commit graph

101 commits

Author SHA1 Message Date
SomberNight
4f2aa53a76
interface: in server.version, send "electrum/3.3.4" as client name
closes #5246
2019-04-12 19:11:25 +02:00
SomberNight
3b1ece4c70
interface: if iface conn fails early, don't wait for timeout of 'ready'
Network code is waiting for iface.ready with a timeout.
While network.py code is waiting, the already failed iface takes up a slot
in "connecting".
2019-03-18 21:34:01 +01:00
SomberNight
0bf0b1d20b
interface.is_server_ca_signed: don't rely on assert 2019-02-18 18:00:54 +01:00
ghost43
c8562f5362
network: reintroduce network.debug (#5093)
network.debug and interface.debug were removed during the asyncio-aiorpcx
network-rewrite.
2019-02-12 20:23:43 +01:00
ThomasV
eb96d422f7 import version module 2019-02-09 12:15:46 +01:00
SomberNight
d77e4d8f5d
exception formatting: use repr(e) instead of str(e) in messages
repr(e) is more useful
2019-01-17 17:16:19 +01:00
SomberNight
4d0030363b
interface: catch more SOCKS exceptions 2019-01-04 11:00:48 +01:00
ghost43
7773443c17
network: put NetworkTimeout constants together (#4945)
* network: put NetworkTimeout constants together

* fix prev
2018-12-20 16:49:17 +01:00
SomberNight
78f5afff74
use certifi directly instead of requests 2018-12-13 23:11:59 +01:00
SomberNight
c09ac41b27
ssl: use certifi explicitly for aiohttp and electrum-server connections
fixes ssl issues on Android
2018-12-13 22:54:53 +01:00
SomberNight
0ddccd56c7
interface: fix only-genesis regtest case 2018-12-10 17:46:37 +01:00
SomberNight
9607854b67
network: fix switching interface (restart old one)
follow-up b3ff173b45
connection_down was killing the already restarted old interface
2018-12-10 08:03:42 +01:00
SomberNight
b3ff173b45
interface: change close() implementation
was getting on lightning branch in some circumstances
RecursionError: maximum recursion depth exceeded while calling a Python object
2018-12-09 20:02:00 +01:00
SomberNight
141ff99580
blockchain.py: generalise fork ids to get rid of conflicts 2018-11-22 16:57:22 +01:00
ThomasV
a266de6735 PrintError: display verbosity filter 2018-11-14 13:16:08 +01:00
SomberNight
1c63bca2c7
follow-up prev 2018-10-30 19:19:46 +01:00
SomberNight
5b4fada2a0
fix some network.get_transaction calls
see #4814 (issuecomment-434392195)
2018-10-30 19:07:37 +01:00
SomberNight
bcdb0c46fc
update to aiorpcx 0.9 and require it 2018-10-26 17:06:42 +02:00
SomberNight
81cc20039e
more type annotations in core lib 2018-10-22 16:41:25 +02:00
SomberNight
e3b372946a
rm aiosafe decorator. instead: log_exceptions and ignore_exceptions 2018-10-12 18:36:48 +02:00
SomberNight
37206ec08e
network: auto-switch servers to preferred fork (or longest chain)
If auto_connect is enabled, allow jumping between forks too.
(Previously auto_connect was only switching servers on a given fork,
not across forks)
If there is a preferred fork set, jump to that (and stay);
if there isn't, always jump to the longest fork.
2018-10-11 20:07:19 +02:00
SomberNight
02f108d927
restructure synchronizer
fix CLI notify cmd. fix merchant websockets.
2018-10-03 17:13:46 +02:00
SomberNight
5e4a4ae16b
minor clean-up (prints/types/imports) 2018-09-28 17:58:46 +02:00
SomberNight
3e2c5e8656
network.best_effort_reliable: force DC if req times out; retry on new iface 2018-09-27 21:15:07 +02:00
SomberNight
4984890265
follow-up prev: make best_effort_reliable react faster to disconnects 2018-09-27 20:04:36 +02:00
SomberNight
6b8ad2d126
fix some CLI/RPC commands 2018-09-27 18:01:25 +02:00
SomberNight
deda6535e0
bump min aiorpcx to 0.8.2 2018-09-25 19:22:37 +02:00
SomberNight
952e9b87e1
network: clean-up. make external API clear. rm interface_lock (mostly). 2018-09-25 16:44:39 +02:00
SomberNight
3be5b4b00f
network: fix some threading issues 2018-09-20 21:07:31 +02:00
SomberNight
855a70bc66
network: new trigger 'blockchain_updated'
follow-up af63913189
needed to update history tab when new blocks come,
to refresh the number of confirmations (icons/tooltips)
2018-09-19 21:56:09 +02:00
SomberNight
8ee1f140d8
interface: split run_fetch_blocks
The 'continue' in the middle was too easy to miss.
We want a 'network_updated' trigger from every interface,
not just the fastest.
2018-09-19 20:30:54 +02:00
SomberNight
9161e8c8f4
interface: refuse to overwrite blockchain of main interface
in case of conflicting forks
2018-09-19 17:56:42 +02:00
SomberNight
adc91eb75e
interface: hostname cannot be empty 2018-09-18 20:21:10 +02:00
SomberNight
af63913189
network triggers: rm 'updated'; more fine-grained instead
rm 'interfaces'
add 'wallet_updated', add 'network_updated'
2018-09-18 16:49:48 +02:00
SomberNight
825d7c2cbd
interface: subscribe to headers in run_fetch_blocks
so that 'monitor_connection' is already running while waiting for first header
2018-09-18 15:40:32 +02:00
SomberNight
7221fb3231
interface: further simplifications for fork resolution 2018-09-17 22:30:25 +02:00
SomberNight
b3a2bce213
interface: simplify fork resolution logic 2018-09-17 22:30:21 +02:00
SomberNight
4360a785ad
blockchain: blockchains_lock needed to write/iterate global dict 2018-09-16 18:26:40 +02:00
SomberNight
7dc5665ab1
interface: faster bootstrap of backwards search 2018-09-16 18:18:49 +02:00
SomberNight
9c919e6478
interface: fix off-by-one in request_chunk
was harmless; usually we just downloaded an extra individual header after the chunk
2018-09-16 09:01:53 +02:00
SomberNight
1d711eeadc
interface: split up 'step'; binary search of headers 2018-09-16 08:29:01 +02:00
SomberNight
58a5346d72
network: switch lagging interface 2018-09-16 07:59:36 +02:00
SomberNight
27e42b4826
interface: if header is on other chain already, just switch (regression) 2018-09-16 07:42:25 +02:00
SomberNight
3fc9326c43
interface: try hard not to infinite loop while getting headers 2018-09-16 07:35:11 +02:00
SomberNight
da23e71db1
interface: block header search simplifications 2018-09-16 07:34:05 +02:00
SomberNight
ab94a47b8e
network: mv request_chunk to interface
this is a bugfix: the old code always tried to connect the chunk to
network.blockchain(). the correct behaviour is to connect to the
blockchain of the interface.
2018-09-16 06:09:14 +02:00
SomberNight
6f5a4a5502
fix prev: rm incorrect assert 2018-09-15 08:23:49 +02:00
SomberNight
482259df8b
interface: further clean-up in 'step' 2018-09-15 07:26:36 +02:00
SomberNight
beb37aafc5
interface: clean-up 'step'; backwards search 2018-09-15 06:44:18 +02:00
SomberNight
e4bd445a38
network.new_interface: clarify how timed out interfaces are closed 2018-09-13 20:50:32 +02:00