mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-01 12:56:08 +00:00
mempool: add a safety check, write tests for mempoolIDs (#3487)
* mempool: add a safety check, write tests for mempoolIDs and document 65536 limit in the mempool reactor spec follow-up to https://github.com/tendermint/tendermint/pull/2778 * rename the test * fixes after Ismail's review
This commit is contained in:
@@ -13,4 +13,10 @@ for details.
|
||||
Sending incorrectly encoded data or data exceeding `maxMsgSize` will result
|
||||
in stopping the peer.
|
||||
|
||||
The mempool will not send a tx back to any peer which it received it from.
|
||||
The mempool will not send a tx back to any peer which it received it from.
|
||||
|
||||
The reactor assigns an `uint16` number for each peer and maintains a map from
|
||||
p2p.ID to `uint16`. Each mempool transaction carries a list of all the senders
|
||||
(`[]uint16`). The list is updated every time mempool receives a transaction it
|
||||
is already seen. `uint16` assumes that a node will never have over 65535 active
|
||||
peers (0 is reserved for unknown source - e.g. RPC).
|
||||
|
||||
Reference in New Issue
Block a user