Commit f91d5e1
committed
Keep network statuses up to date as requests are made
NetworkController has the ability to analyze an RPC endpoint and capture
its availability status (that is, whether the controller is able to make
successful requests to the endpoint). However, this step occurs
automatically only once, when the RPC endpoint's network is switched to,
and so any changes in status while the network is being used will not
be reflected in state. This problem can be mitigated by periodically
calling `lookupNetwork` manually, but this is awkward, and usage of this
method should be kept in check so as not to create too many requests.
Ideally, the controller should keep track of network status as requests
are made. This commit implements this change by hooking into events
published by the network client and added in a previous commit.1 parent b16597a commit f91d5e1
File tree
7 files changed
+1005
-76
lines changed- packages/network-controller
- src
- rpc-service
- tests
7 files changed
+1005
-76
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1491 | 1491 | | |
1492 | 1492 | | |
1493 | 1493 | | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
1494 | 1519 | | |
1495 | 1520 | | |
1496 | 1521 | | |
| |||
1898 | 1923 | | |
1899 | 1924 | | |
1900 | 1925 | | |
1901 | | - | |
1902 | | - | |
| 1926 | + | |
| 1927 | + | |
1903 | 1928 | | |
1904 | 1929 | | |
1905 | | - | |
| 1930 | + | |
1906 | 1931 | | |
1907 | 1932 | | |
1908 | 1933 | | |
| |||
1977 | 2002 | | |
1978 | 2003 | | |
1979 | 2004 | | |
1980 | | - | |
1981 | | - | |
| 2005 | + | |
1982 | 2006 | | |
1983 | 2007 | | |
1984 | | - | |
| 2008 | + | |
1985 | 2009 | | |
1986 | 2010 | | |
1987 | 2011 | | |
| |||
2001 | 2025 | | |
2002 | 2026 | | |
2003 | 2027 | | |
2004 | | - | |
2005 | | - | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
2006 | 2031 | | |
2007 | 2032 | | |
2008 | 2033 | | |
2009 | 2034 | | |
2010 | | - | |
2011 | | - | |
| 2035 | + | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
2012 | 2039 | | |
2013 | 2040 | | |
2014 | 2041 | | |
| |||
2017 | 2044 | | |
2018 | 2045 | | |
2019 | 2046 | | |
2020 | | - | |
2021 | | - | |
2022 | | - | |
2023 | | - | |
2024 | | - | |
2025 | | - | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
2026 | 2056 | | |
2027 | 2057 | | |
2028 | 2058 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | | - | |
7 | | - | |
8 | | - | |
| 7 | + | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
12 | | - | |
| 11 | + | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
16 | | - | |
17 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
21 | | - | |
22 | | - | |
23 | | - | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
0 commit comments