Commit Graph

30 Commits

Author SHA1 Message Date
Neil Booth 389c8e8a8d Only write config file once. 2015-07-03 13:56:17 +09:00
Neil Booth e8db8983ec Make the synchronizer not a thread.
The synchronizer's work is done from the network proxy's main loop.

A minor problem with the old synchronizer was that it considered itself
out of date if the network was out of date.  This was too generic: the
network can have pending requests unrelated to the synchronizer.  This
resulted in the synchronizer often unnecessarily flipping the wallet
between up-to-date and not-up-to-date, and causing unnecessary calls
to wallet.save_transactions().  This was observable when opening the
network dialog box: frequently just opening it would cause a wallet
status change and transaction flush, simply because the network dialog
sends a get_parameters() request.  This rework of the synchronizer does
not have that issue.
2015-06-09 08:41:31 +09:00
ThomasV 0b874b2bb0 Readding pending_transactions_for_notifications, needed by the gui. 2015-06-05 08:56:55 +02:00
Neil Booth a2445aa27d Remove unused vars and imports. 2015-06-05 11:54:00 +09:00
Neil Booth 39fe24b4d3 Rename auto_cycle to auto_connect in config
User config is updated if appropriate.
Add tests behaviour is as expected.
Just the one rename-it reference to auto_cycle remains.
2015-05-25 16:18:52 +09:00
ThomasV 5bd22d2378 follow-up to bd781d600b8ce2bc9dcebebbdb0fb60ad2fb892e: use pipe 2015-05-21 12:50:26 +02:00
Neil Booth bd781d600b Have queues passed to the network constructor.
This is somewhat cleaner as the proxy's pipe and network setup
was awkwardly interleaved.  It also means network's constructor
is free to use both; currently some code is working around the
fact that the response queue doesn't exist in the constructor.
2015-05-21 12:49:39 +09:00
ThomasV 1d517abf39 restore network_proxy.get_local_height 2015-05-08 11:12:19 +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 98cc9c53d1 do not write config file from network class 2015-04-02 10:50:09 +02: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 b53a813111 revert 33b11422 2015-03-06 21:46:30 +01:00
ThomasV 33b11422a8 give a short timeout for daemon calls that actually do not require the network 2015-03-06 08:12:30 +01:00
ThomasV 59c76f5e09 use file socket for daemon 2015-03-05 07:16:48 +01:00
Tafelpoot d9c5250a6f removed trailing whitespace and fixed indentation in history widget 2014-10-21 19:05:51 +02:00
ThomasV dd849964d1 interface: forward errors 2014-09-05 14:51:37 +02:00
ThomasV 00aaa1d065 send network status on init, if there is no daemon 2014-08-04 11:38:34 +02:00
ThomasV d33b53f850 close GUI if the network daemon is killed 2014-07-31 07:47:59 +02:00
ThomasV 58c817f81a close interfaces on shutdown 2014-07-29 12:13:21 +02:00
ThomasV 28df27fba2 update interface.py 2014-07-28 00:13:40 +02:00
ThomasV 035ecbc7cd redo inter-thread communication using pipes 2014-07-27 17:13:46 +02:00
ThomasV 9efc25bdba interface: use parse_json 2014-07-26 16:24:22 +02:00
ThomasV 603caf228f call json.dump on request 2014-07-26 13:04:02 +02:00
ThomasV af3fd62fd4 send server height and server lag with daemon 2014-07-25 16:32:19 +02:00
ThomasV 96070246b7 proper start and stop commands for daemon 2014-07-25 15:42:28 +02:00
ThomasV 2120b1a573 command line: wait until daemon is connected 2014-07-25 13:30:27 +02:00
ThomasV 8196bc5779 adapt network dialog to daemon 2014-07-25 09:11:56 +02:00
ThomasV 09e4efc439 daemon notifications (network.status) 2014-07-24 23:17:06 +02:00
ThomasV 9ee0614edb make daemon usable with the GUI 2014-07-24 16:12:18 +02:00