Sync chain more readily from inbound peers during IBD
Sync chain more readily from inbound peers during IBD

When in IBD, if the honest chain is only known by inbound peers, then we must
eventually sync from them in order to learn it. This change allows us to
perform initial headers sync and fetch blocks from inbound peers, if we have no
blocks in flight.

The restriction on having no blocks in flight means that we will naturally
throttle our block downloads to any such inbound peers that we may be
downloading from, until we leave IBD. This is a tradeoff between preferring
outbound peers for most of our block download, versus making sure we always
eventually will get blocks we need that are only known by inbound peers even
during IBD, as otherwise we may be stuck in IBD indefinitely (which could have
cascading failure on the network, if a large fraction of the network managed to
get stuck in IBD).

kallewoof/bitcoin,bitcoin/bitcoin,particl/particl-core,AkioNak/bitcoin,fujicoin/fujicoin,particl/particl-core,fanquake/bitcoin,fujicoin/fujicoin,instagibbs/bitcoin,fanquake/bitcoin,jambolo/bitcoin,lateminer/bitcoin,jamesob/bitcoin,mruddy/bitcoin,namecoin/namecoin-core,domob1812/bitcoin,sstone/bitcoin,Xekyo/bitcoin,namecoin/namecore,Xekyo/bitcoin,sipsorcery/bitcoin,AkioNak/bitcoin,tecnovert/particl-core,sipsorcery/bitcoin,namecoin/namecore,jambolo/bitcoin,fanquake/bitcoin,namecoin/namecoin-core,fanquake/bitcoin,mruddy/bitcoin,kallewoof/bitcoin,jamesob/bitcoin,ajtowns/bitcoin,instagibbs/bitcoin,jamesob/bitcoin,AkioNak/bitcoin,namecoin/namecore,lateminer/bitcoin,tecnovert/particl-core,jamesob/bitcoin,namecoin/namecoin-core,andreaskern/bitcoin,sstone/bitcoin,ajtowns/bitcoin,domob1812/bitcoin,bitcoin/bitcoin,sipsorcery/bitcoin,namecoin/namecoin-core,Xekyo/bitcoin,sipsorcery/bitcoin,ajtowns/bitcoin,namecoin/namecoin-core,Xekyo/bitcoin,lateminer/bitcoin,andreaskern/bitcoin,lateminer/bitcoin,fujicoin/fujicoin,lateminer/bitcoin,mruddy/bitcoin,mruddy/bitcoin,bitcoinsSG/bitcoin,instagibbs/bitcoin,namecoin/namecore,fanquake/bitcoin,instagibbs/bitcoin,kallewoof/bitcoin,kallewoof/bitcoin,bitcoin/bitcoin,Xekyo/bitcoin,andreaskern/bitcoin,andreaskern/bitcoin,particl/particl-core,fujicoin/fujicoin,AkioNak/bitcoin,sstone/bitcoin,jambolo/bitcoin,mruddy/bitcoin,jamesob/bitcoin,fanquake/bitcoin,jamesob/bitcoin,namecoin/namecore,ajtowns/bitcoin,bitcoinsSG/bitcoin,lateminer/bitcoin,kallewoof/bitcoin,particl/particl-core,jambolo/bitcoin,sstone/bitcoin,mruddy/bitcoin,fujicoin/fujicoin,fujicoin/fujicoin,bitcoinsSG/bitcoin,jambolo/bitcoin,ajtowns/bitcoin,bitcoin/bitcoin,bitcoin/bitcoin,tecnovert/particl-core,bitcoinsSG/bitcoin,sipsorcery/bitcoin,domob1812/bitcoin,andreaskern/bitcoin,bitcoin/bitcoin,namecoin/namecore,ajtowns/bitcoin,bitcoinsSG/bitcoin,bitcoinsSG/bitcoin,namecoin/namecoin-core,sstone/bitcoin,sipsorcery/bitcoin,instagibbs/bitcoin,domob1812/bitcoin,domob1812/bitcoin,tecnovert/particl-core,tecnovert/particl-core,jambolo/bitcoin,particl/particl-core,Xekyo/bitcoin,AkioNak/bitcoin,particl/particl-core,andreaskern/bitcoin,sstone/bitcoin,domob1812/bitcoin,tecnovert/particl-core,instagibbs/bitcoin,kallewoof/bitcoin,AkioNak/bitcoin