Commit graph

97 commits

Author SHA1 Message Date
SomberNight
4537f2bcd5
persist nodes in channel_db on disk 2018-11-05 20:15:57 +01:00
SomberNight
6742654681
persist channel db on disk. verify channel gossip sigs. 2018-11-05 20:07:42 +01:00
SomberNight
80bbd9edc3
start using electrum protocol 1.4 2018-11-05 20:06:01 +01:00
ThomasV
93796b1e32
Separate open_channel dialog. In open_channel_coroutine, use host and port from channel announcements 2018-11-05 20:05:33 +01:00
ThomasV
586dc0a891
lightning: single shared instance of Watcher, ChannelDB and PathFinder 2018-11-05 20:05:31 +01:00
Janus
cf2ec480cc
lightning: misc patches, launch asyncio loop on separate thread 2018-11-05 19:55:08 +01:00
SomberNight
a89e67eeed
network: trivial clean-up 2018-11-04 19:25:23 +01:00
SomberNight
7a46bd1089
network: minor clean-up 2018-11-03 17:11:08 +01:00
SomberNight
e37da62a1c
fix most "scripts"
related: #4754
2018-11-02 20:14:59 +01:00
SomberNight
5c4a6c0f2b
rm network.add_job
current implementation is prone to race, and is not used anyway
2018-11-02 16:06:47 +01:00
SomberNight
c2ecfaf239
move event loop construction to daemon 2018-11-01 16:30:03 +01:00
SomberNight
5b4fada2a0
fix some network.get_transaction calls
see #4814 (issuecomment-434392195)
2018-10-30 19:07:37 +01:00
SomberNight
9037f25da1
kill old-style namedtuples 2018-10-28 00:28:29 +02:00
SomberNight
917b7fa898
network shutdown safety belts 2018-10-26 22:43:33 +02:00
SomberNight
791e0e1a67
move relayfee and dust_threshold to bitcoin.py 2018-10-25 23:08:59 +02:00
SomberNight
81cc20039e
more type annotations in core lib 2018-10-22 16:41:25 +02:00
SomberNight
ef2a6359e4
fix SSL log spam on py3.7
based on kyuupichan/electrumx@83813ff1ac
see pooler/electrum-ltc#191
2018-10-21 03:09:47 +02:00
SomberNight
637e65efe3
network.stop: fix await 2018-10-20 23:17:10 +02:00
SomberNight
0e59bc1bc5
network: "switch unwanted fork" should check what fork we are on..
follow-up #4767
2018-10-14 04:23:10 +02:00
SomberNight
8fa6bd2aac
network: add_job 2018-10-12 19:03:36 +02:00
SomberNight
e3b372946a
rm aiosafe decorator. instead: log_exceptions and ignore_exceptions 2018-10-12 18:36:48 +02:00
SomberNight
372921b423
mv NetworkJobOnDefaultServer to util
break ref cycles
2018-10-12 16:09:41 +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
ThomasV
cd5453e477
Merge pull request #4753 from SomberNight/synchronizer_rewrite
restructure synchronizer
2018-10-10 20:46:17 +02:00
SomberNight
87b05e1c9e
network: change broadcast_transaction api
raise exceptions instead of weird return values
closes #4433
2018-10-10 15:56:41 +02:00
SomberNight
cc18f66793
network: don't save negative ETA fee estimates
-1 means bitcoind could not give an estimate
2018-10-09 12:03:38 +02:00
SomberNight
02f108d927
restructure synchronizer
fix CLI notify cmd. fix merchant websockets.
2018-10-03 17:13:46 +02:00
SomberNight
da9d1e6001
network: ensure there is a main interface
scenario with previous code:
auto_connect enabled, there is only one server in regtest environment.
client started before server; client would not switch to server after it is started.
2018-10-01 18:16:37 +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
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
55b582511e
fix deprecation warnings in regexes 2018-09-20 18:31:17 +02:00
SomberNight
cedd518aea
mark 'blockchain_headers' file as sparse on windows
based on fyookball/electrum@647a6cc26d
2018-09-19 22:09:54 +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
9161e8c8f4
interface: refuse to overwrite blockchain of main interface
in case of conflicting forks
2018-09-19 17:56:42 +02:00
SomberNight
96b699e534
synchronizer: fix refresh bug 2018-09-19 16:35:30 +02:00
SomberNight
916cdebacb
network: send out update trigger when stopping/starting network 2018-09-18 19:27:33 +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
4360a785ad
blockchain: blockchains_lock needed to write/iterate global dict 2018-09-16 18:26:40 +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
2e61359d50
network: stop pending connections when stopping network 2018-09-13 21:20:55 +02:00
SomberNight
23f56ffa8a
network: avoid infinite reconnect loop to same server 2018-09-13 21:02:37 +02:00
SomberNight
e4bd445a38
network.new_interface: clarify how timed out interfaces are closed 2018-09-13 20:50:32 +02:00
SomberNight
78e9152723
network: get_servers to always include recent servers 2018-09-13 16:06:41 +02:00
SomberNight
1f14894c43
network: add server to recent_servers only after checks 2018-09-13 03:45:21 +02:00
SomberNight
a3fb865db0
follow-up prev
this is already running inside interface.group
2018-09-12 21:22:46 +02:00
SomberNight
6452582a17
network: batch requests in request_server_info 2018-09-12 21:18:08 +02:00
SomberNight
8cd08cc0fa
network: rm dead code; simplify 2018-09-12 01:40:54 +02:00