MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / CNode

Method CNode

src/net.cpp:2702–2773  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2700unsigned int CConnman::GetReceiveFloodSize() const { return nReceiveFloodSize; }
2701
2702CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn, SOCKET hSocketIn, const CAddress& addrIn, uint64_t nKeyedNetGroupIn, uint64_t nLocalHostNonceIn, const CAddress &addrBindIn, const std::string& addrNameIn, bool fInboundIn) :
2703 nTimeConnected(GetSystemTimeInSeconds()),
2704 addr(addrIn),
2705 addrBind(addrBindIn),
2706 fInbound(fInboundIn),
2707 nKeyedNetGroup(nKeyedNetGroupIn),
2708 addrKnown(5000, 0.001),
2709 filterInventoryKnown(50000, 0.000001),
2710 id(idIn),
2711 nLocalHostNonce(nLocalHostNonceIn),
2712 nLocalServices(nLocalServicesIn),
2713 nMyStartingHeight(nMyStartingHeightIn),
2714 nSendVersion(0)
2715{
2716 nServices = NODE_NONE;
2717 hSocket = hSocketIn;
2718 nRecvVersion = INIT_PROTO_VERSION;
2719 nLastSend = 0;
2720 nLastRecv = 0;
2721 nSendBytes = 0;
2722 nRecvBytes = 0;
2723 nTimeOffset = 0;
2724 addrName = addrNameIn == "" ? addr.ToStringIPPort() : addrNameIn;
2725 nVersion = 0;
2726 strSubVer = "";
2727 fWhitelisted = false;
2728 fOneShot = false;
2729 m_manual_connection = false;
2730 fClient = false; // set by version message
2731 m_limited_node = false; // set by version message
2732 fFeeler = false;
2733 fSuccessfullyConnected = false;
2734 fDisconnect = false;
2735 nRefCount = 0;
2736 nSendSize = 0;
2737 nSendOffset = 0;
2738 hashContinue = uint256();
2739 nStartingHeight = -1;
2740 filterInventoryKnown.reset();
2741 fSendMempool = false;
2742 fGetAddr = false;
2743 nNextLocalAddrSend = 0;
2744 nNextAddrSend = 0;
2745 nNextInvSend = 0;
2746 fRelayTxes = false;
2747 fSentAddr = false;
2748 pfilter = MakeUnique<CBloomFilter>();
2749 timeLastMempoolReq = 0;
2750 nLastBlockTime = 0;
2751 nLastTXTime = 0;
2752 nPingNonceSent = 0;
2753 nPingUsecStart = 0;
2754 nPingUsecTime = 0;
2755 fPingQueued = false;
2756 nMinPingUsecTime = std::numeric_limits<int64_t>::max();
2757 minFeeFilter = 0;
2758 lastSentFeeFilter = 0;
2759 nextSendTimeFeeFilter = 0;

Callers

nothing calls this directly

Calls 5

GetSystemTimeInSecondsFunction · 0.85
maxFunction · 0.85
ToStringIPPortMethod · 0.80
uint256Class · 0.70
resetMethod · 0.45

Tested by

no test coverage detected