mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
Moved PushGetBlocks to main.cpp to eliminate dependence of net.cpp on CBlockLocator.
This commit is contained in:
parent
336fe971e6
commit
8926263dde
4 changed files with 18 additions and 16 deletions
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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue