For software that interfaces with Bitcoin Core via RPC, it can be useful to know whether the fRelayTxes flag is set. It could be added to `getnetworkinfo`.

{
    AssertLockHeld(cs_main);
    CBlockIndex *&pindex = *ppindex;
    if (!AcceptBlockHeader(block, state, chainparams, &pindex))
        return false;
    
    
    
    bool fAlreadyHave = pindex->nStatus & BLOCK_HAVE_DATA;
    bool fHasMoreWork = (chainActive.Tip() ? pindex->nChainWork > chainActive.Tip()->nChainWork : true);
    
    
    
    
    
    bool fTooFarAhead = (pindex->nHeight > int(chainActive.Height() + MIN_BLOCKS_TO_KEEP));
    
    
    if (fAlreadyHave) return true;
    if (!fRequested) {  
        if (pindex->nTx != 0) return true;  
        if (!fHasMoreWork) return true;     
        if (fTooFarAhead) return true;