Changeset View
Changeset View
Standalone View
Standalone View
src/net.cpp
Show First 20 Lines • Show All 3,053 Lines • ▼ Show 20 Lines | : nTimeConnected(GetSystemTimeInSeconds()), addr(addrIn), | ||||
id(idIn), nLocalHostNonce(nLocalHostNonceIn), | id(idIn), nLocalHostNonce(nLocalHostNonceIn), | ||||
nLocalExtraEntropy(nLocalExtraEntropyIn), m_conn_type(conn_type_in), | nLocalExtraEntropy(nLocalExtraEntropyIn), m_conn_type(conn_type_in), | ||||
nLocalServices(nLocalServicesIn), nMyStartingHeight(nMyStartingHeightIn) { | nLocalServices(nLocalServicesIn), nMyStartingHeight(nMyStartingHeightIn) { | ||||
hSocket = hSocketIn; | hSocket = hSocketIn; | ||||
addrName = addrNameIn == "" ? addr.ToStringIPPort() : addrNameIn; | addrName = addrNameIn == "" ? addr.ToStringIPPort() : addrNameIn; | ||||
hashContinue = BlockHash(); | hashContinue = BlockHash(); | ||||
if (conn_type_in != ConnectionType::BLOCK_RELAY) { | if (conn_type_in != ConnectionType::BLOCK_RELAY) { | ||||
m_tx_relay = std::make_unique<TxRelay>(); | m_tx_relay = std::make_unique<TxRelay>(); | ||||
} | |||||
if (RelayAddrsWithConn()) { | |||||
m_addr_known = std::make_unique<CRollingBloomFilter>(5000, 0.001); | m_addr_known = std::make_unique<CRollingBloomFilter>(5000, 0.001); | ||||
} | } | ||||
// Don't relay proofs if avalanche is disabled | // Don't relay proofs if avalanche is disabled | ||||
if (isAvalancheEnabled(gArgs)) { | if (isAvalancheEnabled(gArgs)) { | ||||
m_proof_relay = std::make_unique<ProofRelay>(); | m_proof_relay = std::make_unique<ProofRelay>(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 154 Lines • Show Last 20 Lines |