|
|
|
@ -22,7 +22,6 @@ class CBlock;
@@ -22,7 +22,6 @@ class CBlock;
|
|
|
|
|
class CBlockIndex; |
|
|
|
|
class CKeyItem; |
|
|
|
|
class CReserveKey; |
|
|
|
|
class CBlockLocator; |
|
|
|
|
|
|
|
|
|
class CAddress; |
|
|
|
|
class CInv; |
|
|
|
@ -1047,43 +1046,6 @@ extern CChain chainActive;
@@ -1047,43 +1046,6 @@ extern CChain chainActive;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Describes a place in the block chain to another node such that if the
|
|
|
|
|
* other node doesn't have the same branch, it can find a recent common trunk. |
|
|
|
|
* The further back it is, the further before the fork it may be. |
|
|
|
|
*/ |
|
|
|
|
class CBlockLocator |
|
|
|
|
{ |
|
|
|
|
protected: |
|
|
|
|
std::vector<uint256> vHave; |
|
|
|
|
public: |
|
|
|
|
CBlockLocator() {} |
|
|
|
|
|
|
|
|
|
CBlockLocator(const std::vector<uint256>& vHaveIn) |
|
|
|
|
{ |
|
|
|
|
vHave = vHaveIn; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
IMPLEMENT_SERIALIZE |
|
|
|
|
( |
|
|
|
|
if (!(nType & SER_GETHASH)) |
|
|
|
|
READWRITE(nVersion); |
|
|
|
|
READWRITE(vHave); |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
void SetNull() |
|
|
|
|
{ |
|
|
|
|
vHave.clear(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool IsNull() |
|
|
|
|
{ |
|
|
|
|
return vHave.empty(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
friend class CChain; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|