Commit Graph

116 Commits

Author SHA1 Message Date
ThomasV 791e680a96 abstract database away from wallet and address_synchronizer 2019-02-28 09:02:58 +01:00
SomberNight 4b3a285871 exchange_rate: some clean-up and fixes
- generation of currencies.json was broken
- removed some dead exchanges
2019-02-27 21:48:33 +01:00
ThomasV 52520490c5 improve network send_multiple_requests 2019-02-15 17:37:15 +01:00
SomberNight 7b8114f865 synchronizer: allow server not finding txn sometimes
User has wallet file with history that includes some txid; corresponding
raw tx is not in the "transactions" dict in the file however.
When the synchronizer starts up, it requests this "missing" txn from
the server... but what if the server does not know about it?
Maybe it was reorged and is not in the new best chain,
and not even in mempool. This was not handled previously.

fix #5122
2019-02-14 20:54:55 +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
SomberNight 019884a98b network: follow-up 38ab7ee554 2019-02-12 19:23:58 +01:00
SomberNight 38ab7ee554 network: catch untrusted exceptions from server in public methods
and re-raise a wrapper exception (that retains the original exc in a field)

closes #5111
2019-02-12 17:02:15 +01:00
SomberNight 8072ad1ad9 network broadcast_transaction: make error text clearer 2019-02-11 16:36:01 +01:00
ThomasV 6ade5903dc network: fix send_multiple_requests 2019-02-07 13:30:14 +01:00
ThomasV 4ed8787433 remove 'util.py' from scripts 2019-02-05 20:33:50 +01:00
SomberNight bc2a421d87 network: clean up broadcast_transaction
Handle all exceptions in network.py, instead of in gui code.
Send some exceptions to crash reporter; previously gui code
would suppress them.
2019-02-04 20:27:00 +01:00
SomberNight 52d602b6c1 network: fix get_servers to not modify default list 2019-02-02 20:10:12 +01:00
SomberNight e39e2ed8f1 fix typo
follow-up #5011
closes #5014
2019-01-19 17:50:22 +01:00
SomberNight 5403ae7687 network: sanitize tx broadcast response 2019-01-18 20:25:21 +01:00
SomberNight 5248613e9d gui: prepend broadcast_transaction errors with explanatory message 2018-12-21 20:44:38 +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 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 62e352a2a8 network: don't let _maintain_sessions die from CancelledError
as then the network would get paralysed and no one can fix it
2018-12-09 20:04:42 +01:00
Janus e1f4865844 digitalbitbox, trustedcoin: proxied http client
use common cross-thread HTTP method, which is put in network.py,
since that is where the proxy is. TrustedCoin tested successfully,
but DigitalBitbox can't be tested completely due to #4903

before this commit, digitalbitbox would not use any proxying
2018-12-07 19:19:40 +01:00
SomberNight fe6367cbcd network: validate donation address for server 2018-11-30 18:56:35 +01:00
SomberNight 141ff99580 blockchain.py: generalise fork ids to get rid of conflicts 2018-11-22 16:57:22 +01:00
SomberNight 55963bd092 network: oneserver should be bool
fix #4858
2018-11-20 11:59:06 +01:00
ThomasV f7f4fef156 Merge pull request #4827 from SomberNight/android_oneserver
implement oneserver option for kivy
2018-11-14 16:13:05 +01:00
SomberNight e1b85327be transaction: clean-up multisig_script 2018-11-14 00:37:03 +01:00
SomberNight a89e67eeed network: trivial clean-up 2018-11-04 19:25:23 +01:00
SomberNight 160bc93e26 implement oneserver option for kivy
closes #4826
2018-11-03 17:21:38 +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