Skip to content

Make various improvements to the request manager

Peter Tschipper requested to merge ptschip/nexa:dev_sendpacer into dev
  • Limit the number of sources we can add to 3, but only for transaction requests. It's very rare to get a re-request for a transaction so there's no need to use up so much memory for nodes that have many peers connected. Block requests have no limit to the number of sources.

  • If a peer is misbehaving then set the "desirability" of the peer to zero when adding to the source list.

  • If a peer experiences a re-request then give it a lower desirability based on the number of re-requests it has had.

  • With the recent bug fix to the net code where under heavy load the network was getting deadlocked, we can not remove the requestPacer which was acting as a kind of band aid, preventing that network bug from getting triggered. Instead we can just limit the request manager maps from getting too big...for transactions we can limit to 1Million and for blocks just 2 times the block download window should suffice.

Edited by Peter Tschipper

Merge request reports