mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Moved PushGetBlocks to main.cpp to eliminate dependence of net.cpp on CBlockLocator.
This commit is contained in:
11
src/net.cpp
11
src/net.cpp
@@ -79,17 +79,6 @@ unsigned short GetListenPort()
|
||||
return (unsigned short)(GetArg("-port", GetDefaultPort()));
|
||||
}
|
||||
|
||||
void CNode::PushGetBlocks(CBlockIndex* pindexBegin, uint256 hashEnd)
|
||||
{
|
||||
// Filter out duplicate requests
|
||||
if (pindexBegin == pindexLastGetBlocksBegin && hashEnd == hashLastGetBlocksEnd)
|
||||
return;
|
||||
pindexLastGetBlocksBegin = pindexBegin;
|
||||
hashLastGetBlocksEnd = hashEnd;
|
||||
|
||||
PushMessage("getblocks", CBlockLocator(pindexBegin), hashEnd);
|
||||
}
|
||||
|
||||
// find 'best' local address for a particular peer
|
||||
bool GetLocal(CService& addr, const CNetAddr *paddrPeer)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user