Files
chia-blockchain/chia/protocols/protocol_timing.py
T
e9bf0ec12b Reply type decorator (#8276)
* Check types of messages returned from other peers

* Check message type data structures at startup, check that no peeer messages that expect replies are broadcast, and dynamically check return types of messages that do expect replies.

* Type hint protocol message type check functions

* lint

* typo

* add replay_type decorator

* add api reply decorations

* typo

* Don't check non full-node broadcast messages

* Distinguish internal vs peer protocol error
Added Changelog
Moved static check to import time
Moved protocol timeouts to chia/protocols/protocol_timing.py
Comment typos
Rename create_request -> send_request
Comment that INVALID_PROTOCOL_MESSAGE is bannable, not temporary

* Call static check at module import time

* Rename message_response_ok

* Improve protocol checking for outgoing message validation

* Type-o

* reset submodule

Co-authored-by: almog <almogdepaz@gmail.com>
2021-09-20 11:31:15 -07:00

5 lines
199 B
Python

# These settings should not be end-user configurable
INVALID_PROTOCOL_BAN_SECONDS = 10
API_EXCEPTION_BAN_SECONDS = 10
INTERNAL_PROTOCOL_ERROR_BAN_SECONDS = 10 # Don't flap if our client is at fault