As far as I can tell the only way to download blocks from another peer is through using
getdata messages (is there any other messages?) which have a limit of 50000 items; but there is also MAX_BLOCKS_IN_TRANSIT_PER_PEER (=16) which I'm not sure what it's used for.
My
getdata requests with 17 inventories are ignored
sometimes which has left me confused. I'm not sure if it is the limit on number of blocks I can request or if it is
fPauseSend which will then erase the
m_getdata_requests completely
here which means the request is ignored entirely.