Neil Booth
c9a30eb5f2
Put interface notification handling in its own function.
10 years ago
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.
10 years ago
ThomasV
2104e96a66
network: use get_nowait on one of the two queues
10 years ago
Neil Booth
63733ccd2a
No need for thread to handle requests
Handle requests in the main loop.
Remove unused lock.
interface.py was reworked and send_request() no longer throws.
10 years ago
ThomasV
e33bc2473b
network: don't store unanswered request if result is in cache
10 years ago
ThomasV
6d0bc5d9b3
fix: nodes retry
10 years ago
ThomasV
44f06de796
network: when interface is disconnected, clear cache and resend unanswered requests
10 years ago
ThomasV
a1d1999545
move interfaces maintenance to its own function
10 years ago
ThomasV
f2c2f9d738
network: fix confusion between addresses and cached responses
10 years ago
ThomasV
233fd8ed77
revert 175bfae9e6
. store last known height in wallet instead
10 years ago
Neil Booth
c07e956127
Pass the response_queue to the constructor, not start().
Removes an unnecessary Thread base-class override. The python
documentation also strongly discourages overriding anything other
than run().
10 years ago
Neil Booth
9cf2eff16b
Make is_connected into a member function. No change in logic.
10 years ago
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.
10 years ago
ThomasV
cdd5d6e130
fix #1136
10 years ago
ThomasV
911a60c02d
separate timeouts for server and nodes retry
10 years ago
ThomasV
98cc9c53d1
do not write config file from network class
10 years ago
ThomasV
a805afa900
save recent_servers in separate file
10 years ago
ThomasV
cf0fcac9fa
fix deserialize_server bug
10 years ago
ThomasV
a4cb70649d
fix synchronizer hanging when not connected.
10 years ago
ThomasV
72688a5cfa
clean implementation of daemon threads
10 years ago
ThomasV
9e4eda24b5
fix #1082
10 years ago
ThomasV
f32f1183fc
print_error methods. request timeout for interface
10 years ago
ThomasV
1569cd0420
serialize/deserialize methods for servers
10 years ago
ThomasV
c4d0314817
network: separate interface management from reconnection logic
10 years ago
ThomasV
799a08514b
move proxy logic to network.py. reload socket module if proxy is disabled
10 years ago
ThomasV
0947eb7960
should test proxy_str. fixes issue #1073
10 years ago
ThomasV
73d8ba24d9
fix network connection issues
10 years ago
ThomasV
e9b06f494d
abort set_parameters if changes are not allowed by config
10 years ago
ThomasV
7a9141e509
deserialize network.proxy to prevent variability
10 years ago
ThomasV
510934d545
do not store protocol explicitly
10 years ago
ThomasV
f489466709
fix: notify proxy when switching server
10 years ago
ThomasV
761871b900
sanitize server and protocol
10 years ago
ThomasV
e389745491
remove appdata_dir and data_dir
10 years ago
ThomasV
03a88743a3
fix typo: stdout
10 years ago
ThomasV
3c6cfc8b70
disable server selector if server is passed from cmd line
10 years ago
ThomasV
8ca17a3e70
print traceback is an exception occurs in network.process_request
10 years ago
ThomasV
30763a6555
fix config: serialize/deserialize proxy
10 years ago
Tafelpoot
d9c5250a6f
removed trailing whitespace and fixed indentation in history widget
10 years ago
ThomasV
b8f971fcd6
force reconnect after delay
10 years ago
ThomasV
90590f70ab
reconnect to main server after timeout
10 years ago
Eagle[TM]
a7cd8b5e9f
Update default server list
11 years ago
ThomasV
854f49fbed
fix number of interfaces being opened
11 years ago
ThomasV
ecdb90b0b7
re-use pending_servers to avoid sending unnecessary notifications
11 years ago
ThomasV
642258ebaa
notify about interfaces
11 years ago
ThomasV
858ff86660
network: disconnected retry interval
11 years ago
ThomasV
ec5478c328
don't use pending_servers
11 years ago
ThomasV
517f649532
fix: missing break
11 years ago
ThomasV
0240b8c924
fix switch_to_random_interface
11 years ago
ThomasV
411a87e0a3
fix disconnection error
11 years ago
ThomasV
1c707d05d3
rm wrong assert clause
11 years ago