Skip to content

Commit

Permalink
Attempt at fixing zcoin-qt crash (#539)
Browse files Browse the repository at this point in the history
  • Loading branch information
psolstice authored and a-bezrukov committed Jul 23, 2019
1 parent 130304b commit c948615
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/znodeman.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ class CZnodeMan
/// Find a random entry
CZnode* FindRandomNotInVec(const std::vector<CTxIn> &vecToExclude, int nProtocolVersion = -1);

std::vector<CZnode> GetFullZnodeVector() { return vZnodes; }
std::vector<CZnode> GetFullZnodeVector() { LOCK(cs); return vZnodes; }

std::vector<std::pair<int, CZnode> > GetZnodeRanks(int nBlockHeight = -1, int nMinProtocol=0);
int GetZnodeRank(const CTxIn &vin, int nBlockHeight, int nMinProtocol=0, bool fOnlyActive=true);
Expand All @@ -313,15 +313,15 @@ class CZnodeMan
void ProcessVerifyBroadcast(CNode* pnode, const CZnodeVerification& mnv);

/// Return the number of (unique) Znodes
int size() { return vZnodes.size(); }
int size() { LOCK(cs); return vZnodes.size(); }

std::string ToString() const;

/// Update znode list and maps using provided CZnodeBroadcast
void UpdateZnodeList(CZnodeBroadcast mnb);
/// Perform complete check and only then update list and maps
bool CheckMnbAndUpdateZnodeList(CNode* pfrom, CZnodeBroadcast mnb, int& nDos);
bool IsMnbRecoveryRequested(const uint256& hash) { return mMnbRecoveryRequests.count(hash); }
bool IsMnbRecoveryRequested(const uint256& hash) { LOCK(cs); return mMnbRecoveryRequests.count(hash); }

void UpdateLastPaid();

Expand Down

0 comments on commit c948615

Please sign in to comment.