diff options
Diffstat (limited to 'src/net.cpp')
| -rw-r--r-- | src/net.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp index ac8df82..37c081f 100644 --- a/src/net.cpp +++ b/src/net.cpp | |||
| @@ -181,6 +181,17 @@ bool AnySubscribed(unsigned int nChannel) | |||
| 181 | return false; | 181 | return false; |
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | void CNode::PushGetBlocks(CBlockIndex* pindexBegin, uint256 hashEnd) | ||
| 185 | { | ||
| 186 | // Filter out duplicate requests. | ||
| 187 | if (pindexBegin == pindexLastGetBlocksBegin && hashEnd == hashLastGetBlocksEnd) | ||
| 188 | return; | ||
| 189 | pindexLastGetBlocksBegin = pindexBegin; | ||
| 190 | hashLastGetBlocksEnd = hashEnd; | ||
| 191 | |||
| 192 | PushMessage("getblocks", CBlockLocator(pindexBegin), hashEnd); | ||
| 193 | } | ||
| 194 | |||
| 184 | bool CNode::IsSubscribed(unsigned int nChannel) | 195 | bool CNode::IsSubscribed(unsigned int nChannel) |
| 185 | { | 196 | { |
| 186 | if (nChannel >= vfSubscribe.size()) | 197 | if (nChannel >= vfSubscribe.size()) |