mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-09-05 10:05:00 -05:00
* 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>
5 lines
199 B
Python
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
|