* handle ._get_extra_info() call on a closing connection
* or just return none
* don't check if the transport is closing
* or have to catch an exception
* Add resync API
* Resolve comments
* Fix precommit
* set_wallet_resync RPC call
* disable resync after reset
* Update chia/wallet/wallet_node.py
Co-authored-by: Jeff <paninaro@gmail.com>
* fixes
* fixes
* rename method
* more tests, schema test
* removed formatting changes in initial-config
* another test case
* another test case
* simplification
* rename fix
* hinting
* added notification id table
---------
Co-authored-by: ytx1991 <t.yu@chia.net>
Co-authored-by: Jeff <paninaro@gmail.com>
* When looking for peers, try all DNS servers first, then try the introducer. Start from a random dns server each restart.
* Simplify randomizing dns server order
* dont wait for timeout on None response
* handle return msg by type
* remove empty line
* isort
* improve reply check
* use map to check reply, add has_capability helper
* fix has_capability
* unused import
* Drop unused parameter in `FullNodePeers`
* Adjust protocol message imports
* Use `PeerInfo` instead `Tuple[str, int]` as dict key
* Create the empty set earlier
* Refactor known peers cleanup
* server: Enable and fix `mypy` in `server.py`
* Add a comment about the `Message` hint
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* Tweak assert message
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* Make `name` non-optional
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* Properly reject incoming connections to crawlers
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* Hint `StreamResponse` and return the existing `WebSocketResonse`
* Raise if `remote` is `None`
* Restore old behaviour: succeed, don't fail for self connection
* Raise `HTTPInternalServerError` if `remote` is `None`
* Cast config values to `int`
Co-authored-by: Kyle Altendorf <sda@fstab.net>
Seems like the idea was to log an overview of message types for the
currently active api calls whenever we have multiples of 100 running.
This currently isn't working at all because `len(message_types) % 100 ==
0` will only trigger if there are 100 different message types in the
counter (we don't even have that much different messages). A fix would
be to check `message_types.total() % 100 == 0`. But then, if we hover
around 100 active messages this will repeatedly trigger logs since we
decrement for each processed message, im not sure this all makes much
sense and we anyway log all received message types with `DEBUG` logs so
i decided to just drop this. If someone thinks we should keep it with
the fix or has ideas to make this a more reasonable log instead of
dropping it, let me know :)
* always call close callback
* Some further explorations
* some more explorations
* Add delay while connections are closed in test
* Add a delay to make sure connections drain
* Update chia/server/server.py
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* Update tests/connection_utils.py
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* use log_exceptions context manager
* set close flag correctly
* Added callback type and other changes
Co-authored-by: Kyle Altendorf <sda@fstab.net>