Commit graph

54 commits

Author SHA1 Message Date
ThomasV
305843999e Relicensing 2016-02-24 10:20:30 +01:00
ThomasV
d8dfa62af8 more intuitive debug message 2016-02-21 18:15:25 +01:00
ThomasV
f30149ad49 fix #1579 2015-12-13 06:33:06 +01:00
Kirill Fomichev
d344ee0474 Small blockchain changes 2015-12-12 18:37:18 +03:00
ThomasV
2a1fbf01fe simplify blockchain.py 2015-12-11 12:37:40 +01:00
ThomasV
81f070c83b fix bug in get_target 2015-12-11 10:14:01 +01:00
Kirill Fomichev
334b84c3c3 Add assertions to get_target 2015-11-19 22:03:12 +03:00
Kirill Fomichev
e188929972 Fix proof of work assert in verify_chunk 2015-11-19 18:40:54 +03:00
Neil Booth
93b99ebded Handy new class PrintError
Saves adding "def print_error" to endless classes.
2015-09-06 21:40:00 +09:00
Neil Booth
4c8408b42d Print reason for failure to connect headers
Used to fail just with a "header didn't connect" message, now
it gives a reason too.
2015-08-01 13:09:52 +09:00
ThomasV
e879cb4552 https download of headers 2015-07-18 11:17:19 +02:00
ThomasV
f307b18546 Merge pull request #1268 from kyuupichan/blockchain_nothread
Make the blockchain class not a thread
2015-06-24 09:00:52 +02:00
ThomasV
ec9cdfaf48 blockchain: restore call to set_local_height, forgotten in previous commit 2015-06-13 16:45:42 +02:00
Neil Booth
d16714a1db Make the blockchain class not a thread
Remove interface communication out of blockchain.py
into network.py.  network.py handles protocol requests
for headers and chunks.  blockchain.py continues to
handle their analysis and verification.

If an interface provides a header chain that doesn't
connect, it is dismissed, as per a previous TODO comment.

This removes a thread and another source of timeouts.
I see no performance issues with this when truncating the
blockchain.

Rename 'result' to 'header' for clarity.
2015-06-01 20:53:42 +09:00
ThomasV
233fd8ed77 revert 175bfae9e6. store last known height in wallet instead 2015-05-08 13:43:42 +02:00
Neil Booth
175bfae9e6 Move away from requiring network and blockchain objects to be able to request local height.
We store it in the config object instead of in the blockchain object.
The blockchain object now refers to its config, and calls refresh_height() to update it.
The network objects also refer to the config rather than the blockchain.

This is the first of many small steps to untangle the verifier from stored state and so
permit the history tab to work in offline mode.  The refactoring will simultaneously clean
up a lot of accumulated cruft.
2015-05-03 15:19:29 +09:00
ThomasV
d9874ecb01 add 10 second timeout to header requests 2015-03-25 10:18:32 +01:00
ThomasV
f50a62755c use self.print_error 2015-03-25 09:22:27 +01:00
ThomasV
a4cb70649d fix synchronizer hanging when not connected. 2015-03-14 08:43:43 +01:00
ThomasV
72688a5cfa clean implementation of daemon threads 2015-03-13 23:04:29 +01:00
ThomasV
e389745491 remove appdata_dir and data_dir 2015-02-18 18:48:32 +01:00
Tafelpoot
d9c5250a6f removed trailing whitespace and fixed indentation in history widget 2014-10-21 19:05:51 +02:00
ThomasV
ed8f9666df remove interface.synchronous_get 2014-07-29 00:15:21 +02:00
ThomasV
28df27fba2 update interface.py 2014-07-28 00:13:40 +02:00
Chris Glass
8997c760a2 Do not use mutables as default values!
This blog article explains why (just an example, many other articles
discuss this ad nauseam):
http://pythonconquerstheuniverse.wordpress.com/2012/02/15/mutable-default-arguments/
2014-06-25 17:43:45 +02:00
wozz
5a312290e2 Target Calculation Update
fix #686
2014-05-08 12:44:36 -04:00
ThomasV
9bebc05149 fix bug in chunk validation 2014-03-02 17:43:46 +01:00
ThomasV
df76aac2db fix bug with hex_to_int; remove unused function 2013-11-12 10:14:29 +01:00
Bryan Stitt
91061752cf stop using eval 2013-11-11 22:03:20 -08:00
Bryan Stitt
225d8b83a3 don't use bare except 2013-11-09 21:23:57 -08:00
ThomasV
7deec48705 pass chain to get_target (fixes issue #316) 2013-10-16 14:42:52 +02:00
ThomasV
3aa76f1808 fix bug with chunk requestor 2013-10-15 18:23:47 +02:00
ThomasV
116b10cc11 replace blockchain.height with height(), and fix server_lag issue 2013-10-09 10:04:32 +02:00
ThomasV
bc15caa84c network: fix server lag detection 2013-10-05 10:01:33 +02:00
ThomasV
c0abd3c34e show lag in status line 2013-10-05 00:49:24 +02:00
ThomasV
a38298c5ee handle network.interface being None when network is disconnected 2013-10-04 19:27:50 +02:00
thomasv
50c9830f79 show 'server lagging' icon if server lags and client does not use auto-connect 2013-10-03 18:43:33 +02:00
ThomasV
e462ef48cd restore minimum lag for server swiching 2013-10-03 15:03:50 +02:00
ThomasV
c18a49b8fe auto-cycle: switch to the longest chain 2013-10-03 14:56:48 +02:00
ThomasV
41878dc5e0 rename menu: create tx 2013-09-15 09:03:45 +02:00
thomasv
6b6c508976 replace wallet.interface everywhere 2013-09-12 14:58:42 +02:00
ThomasV
907dca6eb9 simplify interface: use callbacks 2013-09-12 08:41:27 +02:00
thomasv
77871b97af fixes, resend_subscriptions 2013-09-10 19:59:58 +02:00
thomasv
73901a001a pass network to NetworkDialog and Blockchain 2013-09-10 18:27:32 +02:00
thomasv
047e4b3478 move callbacks to the network class 2013-09-09 13:33:25 +02:00
ThomasV
328315f94b separate blockchain and network 2013-09-08 17:23:01 +02:00
ThomasV
022b3eed9b notify wallet wheit height changes 2013-09-05 07:48:48 +02:00
ThomasV
7204dceeac download headers chunks 2013-09-03 07:29:44 +02:00
ThomasV
1650eefdd3 synchronizer: wait for interface 2013-09-02 20:52:14 +02:00
thomasv
2a6e8927dd select the longest blockchain from several servers 2013-09-02 17:49:12 +02:00